summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-10-12 10:31:10 +0200
committerChristian Ambach <ambi@samba.org>2012-10-12 11:49:31 +0200
commit12ae1812d0f123b6b988f597efaabf610f352d30 (patch)
tree701c9feb0cfe5ffc27dbc508c5656ad2f07ab3c3 /source3
parentff82afb1f8ad3cf950277487aff05d442d03c969 (diff)
downloadsamba-12ae1812d0f123b6b988f597efaabf610f352d30.tar.gz
samba-12ae1812d0f123b6b988f597efaabf610f352d30.tar.bz2
samba-12ae1812d0f123b6b988f597efaabf610f352d30.zip
s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled
no sense in calling local flock when clustered sharemodes should be disabled
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c7
1 files changed, 5 insertions, 2 deletions
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;
}