]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_gpfs: Log error if clearing of sharemode fails on close
authorChristof Schmitt <cs@samba.org>
Mon, 6 Jan 2020 21:07:29 +0000 (14:07 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 8 Jan 2020 00:01:37 +0000 (00:01 +0000)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 52ff01b81caee5516d8540034433cccae3fdc0b9..2f949ec8c1bd4eff1bc0a256796f893044f4f2cd 100644 (file)
@@ -199,7 +199,14 @@ static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp)
                 * close gets deferred due to outstanding POSIX locks
                 * (see fd_close_posix)
                 */
-               set_gpfs_sharemode(fsp, 0, 0);
+               int ret = gpfswrap_set_share(fsp->fh->fd, 0, 0);
+               if (ret != 0) {
+                       DBG_ERR("Clearing GPFS sharemode on close failed for "
+                               " %s/%s: %s\n",
+                               fsp->conn->connectpath,
+                               fsp->fsp_name->base_name,
+                               strerror(errno));
+               }
        }
 
        return SMB_VFS_NEXT_CLOSE(handle, fsp);