[PATCH] reiserfs: enable attrs by default if saf
authorJeff Mahoney <jeffm@suse.com>
Wed, 29 Jun 2005 22:53:06 +0000 (18:53 -0400)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 30 Jun 2005 04:02:04 +0000 (21:02 -0700)
The following patch enables attrs by default if the reiserfs_attrs_cleared
bit is set in the superblock.  This allows chattr-type attrs to be used
without any further action by the user.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/reiserfs/super.c

index 660aefca1fd205fd416fb1ac2d5097a6a561d184..d50a5cd860ce721dbeac6a4f3c6e42abcde68cd8 100644 (file)
@@ -1066,6 +1066,8 @@ static void handle_attrs( struct super_block *s )
                                reiserfs_warning(s, "reiserfs: cannot support attributes until flag is set in super-block" );
                                REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
                }
                                reiserfs_warning(s, "reiserfs: cannot support attributes until flag is set in super-block" );
                                REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
                }
+       } else if (le32_to_cpu( rs -> s_flags ) & reiserfs_attrs_cleared) {
+               REISERFS_SB(s)->s_mount_opt |= REISERFS_ATTRS;
        }
 }
 
        }
 }