mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Tested-by: Toshiyuki Okajima <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
1fa1e7f615
commit
2833eb2b46
1 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue