diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f96abecb3c55..6a2f09c61dcd 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2877,7 +2877,8 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb) if (!org_mount_opt.s_qf_names[i]) { for (j = 0; j < i; j++) kfree(org_mount_opt.s_qf_names[j]); - return -ENOMEM; + err = -ENOMEM; + goto restore_holder; } } else { org_mount_opt.s_qf_names[i] = NULL; @@ -3138,6 +3139,7 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb) sbi->mount_opt = org_mount_opt; sb->s_flags = old_sb_flags; +restore_holder: sbi->umount_lock_holder = NULL; return err; }