From a551ee5f222264d26e8eb02ecaf90b828433bab8 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 22 Mar 2012 18:00:17 +0100 Subject: s3:vfs_gpfs: correct use of profiling macros under certain conditions START_PROFILE could have been called, but no END_PROFILE --- source3/modules/vfs_gpfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 65cd33a394..6d66b29187 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -53,6 +53,7 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, { struct gpfs_config_data *config; + int ret = 0; SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, @@ -64,12 +65,12 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, if (config->sharemodes && !set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { - return -1; + ret = -1; } END_PROFILE(syscall_kernel_flock); - return 0; + return ret; } static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp) @@ -98,11 +99,11 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data, return -1); - START_PROFILE(syscall_linux_setlease); - if (linux_set_lease_sighandler(fsp->fh->fd) == -1) return -1; + START_PROFILE(syscall_linux_setlease); + if (config->leases) { ret = set_gpfs_lease(fsp->fh->fd,leasetype); } -- cgit