diff options
author | Andreas Schneider <asn@samba.org> | 2019-01-30 18:45:34 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-02-09 03:43:50 +0100 |
commit | 7ff94b18e2e39567ef7a208084cc5c914c39d3bd (patch) | |
tree | 3720ccd9b17e3ef61df0cfb2a3180e9e63f2ff78 /source3/modules | |
parent | 2ff2594b2bd878928cec30bc72a95a6d38bee154 (diff) | |
download | samba-7ff94b18e2e39567ef7a208084cc5c914c39d3bd.tar.gz |
s3:vfs: Correctly check if OFD locks should be enabled or not
Also the smb.conf options should only be checked once and a reload of
the config should not switch to a different locking mode.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 9 03:43:50 CET 2019 on sn-devel-144
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_default.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index a27d33a6bea..cb5537e096e 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2553,11 +2553,8 @@ static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int op, o START_PROFILE(syscall_fcntl_lock); - if (fsp->use_ofd_locks || !lp_parm_bool(SNUM(fsp->conn), - "smbd", - "force process locks", - false)) { - op = map_process_lock_to_ofd_lock(op, &fsp->use_ofd_locks); + if (fsp->use_ofd_locks) { + op = map_process_lock_to_ofd_lock(op); } result = fcntl_lock(fsp->fh->fd, op, offset, count, type); @@ -2581,11 +2578,8 @@ static bool vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, off_t START_PROFILE(syscall_fcntl_getlock); - if (fsp->use_ofd_locks || !lp_parm_bool(SNUM(fsp->conn), - "smbd", - "force process locks", - false)) { - op = map_process_lock_to_ofd_lock(op, &fsp->use_ofd_locks); + if (fsp->use_ofd_locks) { + op = map_process_lock_to_ofd_lock(op); } result = fcntl_getlock(fsp->fh->fd, op, poffset, pcount, ptype, ppid); |