From: Miklos Szeredi Date: Fri, 28 Oct 2011 12:13:20 +0000 (+0200) Subject: vfs: ignore error on forced remount X-Git-Tag: upstream/snapshot3+hdmi~8844^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2833eb2b465a274d1a2529fed76c6d2904f8022b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git vfs: ignore error on forced remount On emergency remount we want to force MS_RDONLY on the super block even if ->remount_fs() failed for some reason. Signed-off-by: Miklos Szeredi Tested-by: Toshiyuki Okajima Signed-off-by: Christoph Hellwig --- diff --git a/fs/super.c b/fs/super.c index 32a81f3..afd0f1a 100644 --- a/fs/super.c +++ b/fs/super.c @@ -727,8 +727,13 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force) if (sb->s_op->remount_fs) { retval = sb->s_op->remount_fs(sb, &flags, data); - if (retval) - return retval; + if (retval) { + if (!force) + return retval; + /* If forced remount, go ahead despite any errors */ + WARN(1, "forced remount of a %s fs returned %i\n", + sb->s_type->name, retval); + } } sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);