Skip to content

Commit d47db3e

Browse files
author
Kent Overstreet
committed
bcachefs: Delete redundant fsck_err()
'inode_has_wrong_backpointer'; we have more specific errors for every case afterwards. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 165815c commit d47db3e

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

fs/bcachefs/inode.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,6 @@ static inline void bch2_inode_nlink_set(struct bch_inode_unpacked *bi,
283283
int bch2_inode_nlink_inc(struct bch_inode_unpacked *);
284284
void bch2_inode_nlink_dec(struct btree_trans *, struct bch_inode_unpacked *);
285285

286-
static inline bool bch2_inode_should_have_single_bp(struct bch_inode_unpacked *inode)
287-
{
288-
bool inode_has_bp = inode->bi_dir || inode->bi_dir_offset;
289-
290-
return S_ISDIR(inode->bi_mode) ||
291-
inode->bi_subvol ||
292-
(!inode->bi_nlink && inode_has_bp);
293-
}
294-
295286
struct bch_opts bch2_inode_opts_to_opts(struct bch_inode_unpacked *);
296287
void bch2_inode_opts_get(struct bch_io_opts *, struct bch_fs *,
297288
struct bch_inode_unpacked *);

fs/bcachefs/namei.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -733,15 +733,6 @@ static int bch2_check_dirent_inode_dirent(struct btree_trans *trans,
733733
return __bch2_fsck_write_inode(trans, target);
734734
}
735735

736-
if (bch2_inode_should_have_single_bp(target) &&
737-
!fsck_err(trans, inode_wrong_backpointer,
738-
"dirent points to inode that does not point back:\n%s",
739-
(bch2_bkey_val_to_text(&buf, c, d.s_c),
740-
prt_newline(&buf),
741-
bch2_inode_unpacked_to_text(&buf, target),
742-
buf.buf)))
743-
goto err;
744-
745736
struct bkey_s_c_dirent bp_dirent =
746737
bch2_bkey_get_iter_typed(trans, &bp_iter, BTREE_ID_dirents,
747738
SPOS(target->bi_dir, target->bi_dir_offset, target->bi_snapshot),

0 commit comments

Comments
 (0)