patch-2.3.99-pre1 linux/fs/isofs/inode.c

Next file: linux/fs/minix/inode.c
Previous file: linux/fs/hpfs/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.51/linux/fs/isofs/inode.c linux/fs/isofs/inode.c
@@ -994,16 +994,20 @@
 	bmap: _isofs_bmap
 };
 
-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;
@@ -1207,6 +1211,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
@@ -1431,22 +1436,17 @@
 
 static DECLARE_FSTYPE_DEV(iso9660_fs_type, "iso9660", isofs_read_super);
 
-int __init init_iso9660_fs(void)
+static int __init init_iso9660_fs(void)
 {
         return register_filesystem(&iso9660_fs_type);
 }
 
-#ifdef MODULE
-EXPORT_NO_SYMBOLS;
-
-int init_module(void)
+static void __exit exit_iso9660_fs(void)
 {
-	return init_iso9660_fs();
+        unregister_filesystem(&iso9660_fs_type);
 }
 
-void cleanup_module(void)
-{
-	unregister_filesystem(&iso9660_fs_type);
-}
+EXPORT_NO_SYMBOLS;
 
-#endif
+module_init(init_iso9660_fs)
+module_exit(exit_iso9660_fs)

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