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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user