aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-12-30 17:40:31 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:32:42 +0200
commit8c57476e7c28460a7000b433638c5dfb3314c213 (patch)
tree7474519d3c93e4d3ec3c17928fca0ae3b2e09acc /fs/f2fs/namei.c
parenta1ea85f5a903cb9f8a71b233767654510e873361 (diff)
f2fs: fix to skip recovering dot dentries in a readonly fs
If filesystem is readonly, leave user message info instead of recovering inline dot inode. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 7523c94dc..640ddb571 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -215,6 +215,13 @@ static int __recover_dot_dentries(struct inode *dir, nid_t pino)
struct page *page;
int err = 0;
+ if (f2fs_readonly(sbi->sb)) {
+ f2fs_msg(sbi->sb, KERN_INFO,
+ "skip recovering inline_dots inode (ino:%lu, pino:%u) "
+ "in readonly mountpoint", dir->i_ino, pino);
+ return 0;
+ }
+
f2fs_balance_fs(sbi);
f2fs_lock_op(sbi);