vfs_gpfs: Add comment explaining why sharemode is dropped in close call.
authorChristof Schmitt <cs@samba.org>
Mon, 6 Jan 2020 21:00:32 +0000 (14:00 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 8 Jan 2020 00:01:36 +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 2903b36ac39428d69f21151c23c6488e0bd0e49b..52ff01b81caee5516d8540034433cccae3fdc0b9 100644 (file)
@@ -194,6 +194,11 @@ static int vfs_gpfs_close(vfs_handle_struct *handle, files_struct *fsp)
                                return -1);
 
        if (config->sharemodes) {
+               /*
+                * Always clear GPFS sharemode in case the actual
+                * close gets deferred due to outstanding POSIX locks
+                * (see fd_close_posix)
+                */
                set_gpfs_sharemode(fsp, 0, 0);
        }