[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Wed Oct 14 10:09:02 UTC 2020
The branch, master has been updated
via 74fbe0b987a vfs_shadow_copy2: Avoid closing snapsdir twice
from 925cc9aafbe s3:lib: Move interface prototypes to own header file
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 74fbe0b987a0333cca28bb6a547e5b4b4f2e706d
Author: Anoop C S <anoopcs at samba.org>
Date: Mon Oct 12 16:55:40 2020 +0530
vfs_shadow_copy2: Avoid closing snapsdir twice
As per man page for closedir(3):
. . .
The closedir() function closes the directory stream associated with
dirp. A successful call to closedir() also closes the underlying file
descriptor associated with dirp.
. . .
Therefore we don't have to attempt an additional close of file
descriptor after closedir().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14530
Signed-off-by: Jeremy Allison <jra at samba.org>
Signed-off-by: Anoop C S <anoopcs at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Wed Oct 14 10:08:24 UTC 2020 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_shadow_copy2.c | 7 +++++++
1 file changed, 7 insertions(+)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 5081e37c05e..0780895b0dd 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -2116,6 +2116,13 @@ done:
if (p != NULL) {
SMB_VFS_NEXT_CLOSEDIR(handle, p);
p = NULL;
+ if (dirfsp != NULL) {
+ /*
+ * VFS_CLOSEDIR implicitly
+ * closed the associated fd.
+ */
+ dirfsp->fh->fd = -1;
+ }
}
if (dirfsp != NULL) {
fd_close(dirfsp);
--
Samba Shared Repository
More information about the samba-cvs
mailing list