From: Christian Ambach Date: Fri, 12 Oct 2012 08:31:10 +0000 (+0200) Subject: s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled X-Git-Tag: ldb-1.1.14~284 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12ae1812d0f123b6b988f597efaabf610f352d30;p=thirdparty%2Fsamba.git s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled no sense in calling local flock when clustered sharemodes should be disabled --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b3cdca5cd88..fdd8e93cf60 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -61,12 +61,15 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, struct gpfs_config_data, return -1); + if(!config->sharemodes) { + return 0; + } + START_PROFILE(syscall_kernel_flock); kernel_flock(fsp->fh->fd, share_mode, access_mask); - if (config->sharemodes - && !set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { + if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { ret = -1; }