diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-02 18:52:58 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-09 16:15:02 -0400 |
commit | 9850cf4a8908886370b1f15aacf83d291f098c72 (patch) | |
tree | 2ee332a189922cefd47e26ce335cab7ad21e96b2 /fs/f2fs/dir.c | |
parent | 2ae4c673e3cbd69bc2decf6d7f5961f3c7b9b38b (diff) |
f2fs: need fsck.f2fs when f2fs_bug_on is triggered
If any f2fs_bug_on is triggered, fsck.f2fs is needed.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index c242904d9724..f1ceeb2f898e 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
@@ -126,7 +126,7 @@ static struct f2fs_dir_entry *find_in_block(struct page *dentry_page, | |||
126 | * For the most part, it should be a bug when name_len is zero. | 126 | * For the most part, it should be a bug when name_len is zero. |
127 | * We stop here for figuring out where the bugs has occurred. | 127 | * We stop here for figuring out where the bugs has occurred. |
128 | */ | 128 | */ |
129 | f2fs_bug_on(!de->name_len); | 129 | f2fs_bug_on(F2FS_P_SB(dentry_page), !de->name_len); |
130 | 130 | ||
131 | bit_pos += GET_DENTRY_SLOTS(le16_to_cpu(de->name_len)); | 131 | bit_pos += GET_DENTRY_SLOTS(le16_to_cpu(de->name_len)); |
132 | } | 132 | } |
@@ -151,7 +151,7 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir, | |||
151 | bool room = false; | 151 | bool room = false; |
152 | int max_slots = 0; | 152 | int max_slots = 0; |
153 | 153 | ||
154 | f2fs_bug_on(level > MAX_DIR_HASH_DEPTH); | 154 | f2fs_bug_on(F2FS_I_SB(dir), level > MAX_DIR_HASH_DEPTH); |
155 | 155 | ||
156 | nbucket = dir_buckets(level, F2FS_I(dir)->i_dir_level); | 156 | nbucket = dir_buckets(level, F2FS_I(dir)->i_dir_level); |
157 | nblock = bucket_blocks(level); | 157 | nblock = bucket_blocks(level); |