[Pvfs2-cvs] commit by slang in pvfs2/src/kernel/linux-2.6: inode.c

CVS commit program cvs at parl.clemson.edu
Tue Mar 20 13:32:31 EST 2007


Update of /projects/cvsroot/pvfs2/src/kernel/linux-2.6
In directory parlweb1:/tmp/cvs-serv21551/src/kernel/linux-2.6

Modified Files:
	inode.c 
Log Message:
Patches from Phil.  Thanks Phil!  

http://www.beowulf-underground.org/pipermail/pvfs2-developers/2007-March/003250.html



Index: inode.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/inode.c,v
diff -p -u -r1.78 -r1.79
--- inode.c	11 Nov 2006 18:49:21 -0000	1.78
+++ inode.c	20 Mar 2007 18:32:31 -0000	1.79
@@ -512,7 +512,22 @@ struct inode *pvfs2_get_custom_inode_com
          * properly.
          */
         if (from_create)
-            inode->i_mode = mode;
+        {
+            /* the exception is when we are creating a directory that needs
+             * to inherit the setgid bit.  That much we need to preserve from
+             * the getattr's view of the mode.
+             */
+            if(inode->i_mode & S_ISGID)
+            {
+                gossip_debug(GOSSIP_INODE_DEBUG,
+                    "pvfs2_get_custom_inode_commmon: setting SGID bit.\n");
+                inode->i_mode = mode | S_ISGID;
+            }
+            else
+            {
+                inode->i_mode = mode;
+            }
+        }
         gossip_debug(GOSSIP_INODE_DEBUG, 
                 "pvfs2_get_custom_inode_common: inode: %p, inode->i_mode %o\n",
                 inode, inode->i_mode);



More information about the Pvfs2-cvs mailing list