[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Aug 9 02:07:01 UTC 2018


The branch, master has been updated
       via  9b10565 Shorten description in vfs_linux_xfs_sgid manual
       via  bf9cb64 s3/locking: Corrections and improvements to inline comments
      from  0c8174c libsmb: Fix CID 1438243 Unchecked return value

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9b105651c754c7c98297a23c0c1e43d7d2e28139
Author: Justin Stephenson <jstephen at redhat.com>
Date:   Mon Aug 6 11:24:18 2018 -0400

    Shorten description in vfs_linux_xfs_sgid manual
    
    this fixes a lexgrog parse error, the NAME subheader description
    of the vfs_linux_xfs_sgid(8) manual was too long, this will shorten
    the description and allow it to be correctly detected by mandb.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13562
    
    Signed-off-by: Justin Stephenson <jstephen at redhat.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Aug  9 04:06:17 CEST 2018 on sn-devel-144

commit bf9cb64d513d2cdbda558a4cbc65d21fd0c9abbb
Author: Anoop C S <anoopcs at redhat.com>
Date:   Fri Aug 3 11:51:25 2018 +0530

    s3/locking: Corrections and improvements to inline comments
    
    Signed-off-by: Anoop C S <anoopcs at redhat.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Jim McDonough <jmcd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/vfs_linux_xfs_sgid.8.xml |  2 +-
 source3/locking/posix.c                    | 35 +++++++++++++++++++-----------
 2 files changed, 23 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml b/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
index 2bc67e5..7382033 100644
--- a/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
+++ b/docs-xml/manpages/vfs_linux_xfs_sgid.8.xml
@@ -13,7 +13,7 @@
 
 <refnamediv>
 	<refname>vfs_linux_xfs_sgid</refname>
-	<refpurpose>Workaround XFS sgid bit not inherited during mkdir with default acl on Linux older than 3.1</refpurpose>
+	<refpurpose>Workaround XFS sgid bit not inherited</refpurpose>
 </refnamediv>
 
 <refsynopsisdiv>
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 1399266..79c33cf 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -410,20 +410,12 @@ bool posix_locking_end(void)
 }
 
 /****************************************************************************
- Next - the functions that deal with storing fd's that have outstanding
- POSIX locks when closed.
-****************************************************************************/
-
-/****************************************************************************
- The records in posix_pending_close_db are composed of an array of
- ints keyed by dev/ino pair. Those ints are the fd's that were open on
- this dev/ino pair that should have been closed, but can't as the lock
- ref count is non zero.
+ Next - the functions that deal with reference count of number of locks open
+ on a dev/ino pair.
 ****************************************************************************/
 
 /****************************************************************************
- Keep a reference count of the number of locks open on this dev/ino
- pair. Creates entry if it doesn't exist.
+ Increase the lock ref count. Creates lock_ref_count entry if it doesn't exist.
 ****************************************************************************/
 
 static void increment_lock_ref_count(const files_struct *fsp)
@@ -443,6 +435,10 @@ static void increment_lock_ref_count(const files_struct *fsp)
 		  fsp_str_dbg(fsp), (int)lock_ref_count));
 }
 
+/****************************************************************************
+ Reduce the lock ref count.
+****************************************************************************/
+
 static void decrement_lock_ref_count(const files_struct *fsp)
 {
 	struct lock_ref_count_key tmp;
@@ -501,6 +497,18 @@ static void delete_lock_ref_count(const files_struct *fsp)
 }
 
 /****************************************************************************
+ Next - the functions that deal with storing fd's that have outstanding
+ POSIX locks when closed.
+****************************************************************************/
+
+/****************************************************************************
+ The records in posix_pending_close_db are composed of an array of
+ ints keyed by dev/ino pair. Those ints are the fd's that were open on
+ this dev/ino pair that should have been closed, but can't as the lock
+ ref count is non zero.
+****************************************************************************/
+
+/****************************************************************************
  Add an fd to the pending close tdb.
 ****************************************************************************/
 
@@ -618,8 +626,9 @@ int fd_close_posix(const struct files_struct *fsp)
 
 		/*
 		 * There are outstanding locks on this dev/inode pair on
-		 * other fds. Add our fd to the pending close tdb and set
-		 * fsp->fh->fd to -1.
+		 * other fds. Add our fd to the pending close db. We also
+		 * set fsp->fh->fd to -1 inside fd_close() after returning
+		 * from VFS layer.
 		 */
 
 		add_fd_to_close_entry(fsp);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list