diff options
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 1ec602673ea..0901320671d 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -747,15 +747,16 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) __le32 features; int err; + err = -ENOMEM; sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) - return -ENOMEM; + goto failed_unlock; sbi->s_blockgroup_lock = kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL); if (!sbi->s_blockgroup_lock) { kfree(sbi); - return -ENOMEM; + goto failed_unlock; } sb->s_fs_info = sbi; sbi->s_sb_block = sb_block; @@ -1107,6 +1108,7 @@ failed_sbi: sb->s_fs_info = NULL; kfree(sbi->s_blockgroup_lock); kfree(sbi); +failed_unlock: return ret; } @@ -1219,9 +1221,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) } es = sbi->s_es; - if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) != - (old_mount_opt & EXT2_MOUNT_XIP)) && - invalidate_inodes(sb)) { + if ((sbi->s_mount_opt ^ old_mount_opt) & EXT2_MOUNT_XIP) { ext2_msg(sb, KERN_WARNING, "warning: refusing change of " "xip flag with busy inodes while remounting"); sbi->s_mount_opt &= ~EXT2_MOUNT_XIP; |