aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2011-10-28 08:13:20 -0400
committerChristoph Hellwig <hch@serles.lst.de>2011-11-02 07:53:42 -0400
commit2833eb2b465a274d1a2529fed76c6d2904f8022b (patch)
treeac1fedbdc0468e5e9450b4a679a0ee0dc268971f
parent1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8 (diff)
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 <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--fs/super.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index 32a81f3467e0..afd0f1ad45e0 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)
727 727
728 if (sb->s_op->remount_fs) { 728 if (sb->s_op->remount_fs) {
729 retval = sb->s_op->remount_fs(sb, &flags, data); 729 retval = sb->s_op->remount_fs(sb, &flags, data);
730 if (retval) 730 if (retval) {
731 return retval; 731 if (!force)
732 return retval;
733 /* If forced remount, go ahead despite any errors */
734 WARN(1, "forced remount of a %s fs returned %i\n",
735 sb->s_type->name, retval);
736 }
732 } 737 }
733 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK); 738 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
734 739