From: Christof Schmitt Date: Mon, 6 Jan 2020 21:14:17 +0000 (-0700) Subject: vfs_gpfs: Only clear sharemode on close when sharemode has been taken X-Git-Tag: ldb-2.1.0~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef52a907fe80fdb1cd199a21a68126a7bf9b33cb;p=thirdparty%2Fsamba.git vfs_gpfs: Only clear sharemode on close when sharemode has been taken This avoids a redundant error message in case the call to acquire the sharemode had failed before. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 2f949ec8c1b..760bb892ef9 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -193,7 +193,7 @@ static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp) struct gpfs_config_data, return -1); - if (config->sharemodes) { + if (config->sharemodes && fsp->kernel_share_modes_taken) { /* * Always clear GPFS sharemode in case the actual * close gets deferred due to outstanding POSIX locks