From 8e8b87964bc8dc5c14b6543fc933b7725f07d3ac Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 21 Nov 2011 12:11:33 +0100 Subject: 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 Signed-off-by: Miklos Szeredi Tested-by: Toshiyuki Okajima Signed-off-by: Al Viro --- fs/super.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'fs/super.c') diff --git a/fs/super.c b/fs/super.c index 6acc02237e3e..de41e1e46f09 100644 --- a/fs/super.c +++ b/fs/super.c @@ -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; } } -- cgit v1.2.3-59-g8ed1b