s3: smbd: fix a comment in fd_close()
authorRalph Boehme <slow@samba.org>
Sun, 4 Aug 2019 07:29:44 +0000 (09:29 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 6 Aug 2019 14:23:36 +0000 (14:23 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 8fcd7b3b580006590f8d836d589f83334bdf5ea9..5ff83741dcde3aa1af5425c6864d3b6a1aa46960 100644 (file)
@@ -833,7 +833,11 @@ NTSTATUS fd_close(files_struct *fsp)
                dptr_CloseDir(fsp);
        }
        if (fsp->fh->fd == -1) {
-               return NT_STATUS_OK; /* What we used to call a stat open. */
+               /*
+                * Either a directory where the dptr_CloseDir() already closed
+                * the fd or a stat open.
+                */
+               return NT_STATUS_OK;
        }
        if (fsp->fh->ref_count > 1) {
                return NT_STATUS_OK; /* Shared handle. Only close last reference. */