From: Christian Ambach Date: Thu, 22 Mar 2012 17:00:17 +0000 (+0100) Subject: s3:vfs_gpfs: correct use of profiling macros X-Git-Tag: tdb-1.2.10~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a551ee5f222264d26e8eb02ecaf90b828433bab8;p=thirdparty%2Fsamba.git s3:vfs_gpfs: correct use of profiling macros under certain conditions START_PROFILE could have been called, but no END_PROFILE --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 65cd33a394e..6d66b291870 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); }