Skip to content

Commit

Permalink
f2fs: fix to clean previous mount option when remount_fs
Browse files Browse the repository at this point in the history
In manual of mount, we descript remount as below:

"mount -o remount,rw /dev/foo /dir
After  this call all old mount options are replaced and arbitrary stuff from
fstab is ignored, except the loop= option which is internally generated and
maintained by the mount command."

Previously f2fs do not clear up old mount options when remount_fs, so we have no
chance of disabling previous option (e.g. flush_merge). Fix it.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Sep 23, 2014
1 parent 14cecc5 commit 26666c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
org_mount_opt = sbi->mount_opt;
active_logs = sbi->active_logs;

sbi->mount_opt.opt = 0;
sbi->active_logs = NR_CURSEG_TYPE;

/* parse mount options */
err = parse_options(sb, data);
if (err)
Expand Down

0 comments on commit 26666c8

Please sign in to comment.