summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-04-22 14:22:36 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2019-05-09 06:23:12 +0200
commitf824deb54b683165b953371a0529446c723ef6d6 (patch)
treef2fa33f3cc0b3e10d8c50acb2eed730c5191f223 /fs/f2fs/super.c
parentf2fs: relocate chksum_offset for large_nat_bitmap feature (diff)
downloadlinux-f824deb54b683165b953371a0529446c723ef6d6.tar.xz
linux-f824deb54b683165b953371a0529446c723ef6d6.zip
f2fs: fix to consider multiple device for readonly check
This patch introduce f2fs_hw_is_readonly() to check whether lower device is readonly or not, it adapts multiple device scenario. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index fefc8cc6e756..29d985cf8301 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3377,7 +3377,7 @@ try_onemore:
* mount should be failed, when device has readonly mode, and
* previous checkpoint was not done by clean system shutdown.
*/
- if (bdev_read_only(sb->s_bdev) &&
+ if (f2fs_hw_is_readonly(sbi) &&
!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
err = -EROFS;
goto free_meta;