Unionfs: Accept MS_SILENT during remount
authorAdrian Brunyate <abrunyate@yahoo.com>
Thu, 26 Apr 2007 22:51:09 +0000 (18:51 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:30:07 +0000 (21:30 -0500)
[jsipek: whitespace cleanup]
Signed-off-by: Adrian Brunyate <abrunyate@yahoo.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
fs/unionfs/super.c

index e6a6cc1891150ba2dc8a2d5ac4cc9676f36194a7..ee12d030ca1cd4bab2221d3191b1af0681690c0c 100644 (file)
@@ -425,11 +425,12 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
        unionfs_write_lock(sb);
 
        /*
-        * The VFS will take care of "ro" and "rw" flags, so anything else
-        * is an error.  So we need to check if any other flags may have
-        * been passed (none are allowed/supported as of now).
+        * The VFS will take care of "ro" and "rw" flags, and we can safely
+        * ignore MS_SILENT, but anything else left over is an error.  So we
+        * need to check if any other flags may have been passed (none are
+        * allowed/supported as of now).
         */
-       if ((*flags & ~MS_RDONLY) != 0) {
+       if ((*flags & ~(MS_RDONLY | MS_SILENT)) != 0) {
                printk(KERN_WARNING
                       "unionfs: remount flags 0x%x unsupported\n", *flags);
                err = -EINVAL;
@@ -731,7 +732,8 @@ out_no_change:
        i = atomic_inc_return(&UNIONFS_SB(sb)->generation);
        atomic_set(&UNIONFS_D(sb->s_root)->generation, i);
        atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i);
-       printk("unionfs: new generation number %d\n", i);
+       if (!(*flags & MS_SILENT)) 
+               printk("unionfs: new generation number %d\n", i);
        err = 0;                /* reset to success */
 
        /*