vfs: prevent remount read-only if pending removes
If there are any inodes on the super block that have been unlinked (i_nlink == 0) but have not yet been deleted then prevent the remounting the super block read-only. Reported-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -729,10 +729,6 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
|
||||
retval = sb_prepare_remount_readonly(sb);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
retval = -EBUSY;
|
||||
if (!fs_may_remount_ro(sb))
|
||||
goto cancel_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user