linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "f2fs: give a warning only for readonly partition"
@ 2021-03-23  6:41 Chao Yu
  2021-03-23 18:39 ` Jaegeuk Kim
  0 siblings, 1 reply; 15+ messages in thread
From: Chao Yu @ 2021-03-23  6:41 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789.

Because that commit fails generic/050 testcase which expect failure
during mount a recoverable readonly partition.

Fixes: 938a184265d7 ("f2fs: give a warning only for readonly partition")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/super.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b48281642e98..2b78ee11f093 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3952,10 +3952,12 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 		 * previous checkpoint was not done by clean system shutdown.
 		 */
 		if (f2fs_hw_is_readonly(sbi)) {
-			if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG))
+			if (!is_set_ckpt_flags(sbi, CP_UMOUNT_FLAG)) {
+				err = -EROFS;
 				f2fs_err(sbi, "Need to recover fsync data, but write access unavailable");
-			else
-				f2fs_info(sbi, "write access unavailable, skipping recovery");
+				goto free_meta;
+			}
+			f2fs_info(sbi, "write access unavailable, skipping recovery");
 			goto reset_checkpoint;
 		}
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-03-31  3:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  6:41 [PATCH] Revert "f2fs: give a warning only for readonly partition" Chao Yu
2021-03-23 18:39 ` Jaegeuk Kim
2021-03-24  1:57   ` Chao Yu
2021-03-24  4:22     ` Jaegeuk Kim
2021-03-24  7:48       ` Chao Yu
2021-03-24 22:44         ` Jaegeuk Kim
2021-03-25  1:59           ` Chao Yu
2021-03-26  1:08             ` [f2fs-dev] " Chao Yu
2021-03-26  1:19               ` Jaegeuk Kim
2021-03-26  1:34                 ` Chao Yu
2021-03-26 17:30                   ` Jaegeuk Kim
2021-03-27  1:52                     ` Chao Yu
2021-03-27 10:03                       ` Chao Yu
2021-03-31  1:57                         ` Jaegeuk Kim
2021-03-31  3:17                           ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).