aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/xattr.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-01-22 12:35:36 +0100
committerJan Kara <jack@suse.cz>2019-01-22 12:35:36 +0100
commit032cdc39793fc814d78d7302c3e81048a76f3da5 (patch)
tree502f5cde98039c92900f31d95a869b642f3e8a73 /fs/ext2/xattr.c
parentext2: Remove redundant check on s_inode_size (diff)
downloadlinux-dev-032cdc39793fc814d78d7302c3e81048a76f3da5.tar.xz
linux-dev-032cdc39793fc814d78d7302c3e81048a76f3da5.zip
ext2: Set superblock revision when enabling xattr feature
When setting the first xattr, we automatically enable EXT2_FEATURE_COMPAT_EXT_ATTR. However we forget to call ext2_update_dynamic_rev() so in theory if the filesystem was created as ancient one without features support, this could be missed. The consequences are minor anyway - since the feature is compat one, only old e2fsck which does not understand xattrs could do something bad. Reported-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/xattr.c')
-rw-r--r--fs/ext2/xattr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 4f30876ee325..1e33e0ac8cf1 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -342,6 +342,7 @@ static void ext2_xattr_update_super_block(struct super_block *sb)
return;
spin_lock(&EXT2_SB(sb)->s_lock);
+ ext2_update_dynamic_rev(sb);
EXT2_SET_COMPAT_FEATURE(sb, EXT2_FEATURE_COMPAT_EXT_ATTR);
spin_unlock(&EXT2_SB(sb)->s_lock);
mark_buffer_dirty(EXT2_SB(sb)->s_sbh);