patch-2.2.15 linux/fs/isofs/inode.c

Next file: linux/fs/ncpfs/dir.c
Previous file: linux/fs/fat/mmap.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/fs/isofs/inode.c linux/fs/isofs/inode.c
@@ -958,16 +958,20 @@
 }
 
 
-static void test_and_set_uid(uid_t *p, uid_t value)
+static inline void test_and_set_uid(uid_t *p, uid_t value)
 {
 	if(value) {
 		*p = value;
-#if 0
-		printk("Resetting to %d\n", value);
-#endif
 	}
 }
 
+static inline void test_and_set_gid(gid_t *p, gid_t value)
+{
+        if(value) {
+                *p = value;
+        }
+}
+
 static int isofs_read_level3_size(struct inode * inode)
 {
 	unsigned long ino = inode->i_ino;
@@ -1171,6 +1175,7 @@
 	  parse_rock_ridge_inode(raw_inode, inode);
 	  /* hmm..if we want uid or gid set, override the rock ridge setting */
 	 test_and_set_uid(&inode->i_uid, inode->i_sb->u.isofs_sb.s_uid);
+         test_and_set_gid(&inode->i_gid, inode->i_sb->u.isofs_sb.s_gid);
 	}
 
 #ifdef DEBUG

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)