From 12ae1812d0f123b6b988f597efaabf610f352d30 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Fri, 12 Oct 2012 10:31:10 +0200 Subject: s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled no sense in calling local flock when clustered sharemodes should be disabled --- source3/modules/vfs_gpfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b3cdca5cd8..fdd8e93cf6 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; } -- cgit