diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-01 01:47:49 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-02 19:16:35 +0300 |
commit | d47db3e63679541f4dd4696ce4661b6917cb9684 (patch) | |
tree | 70a4f43bfbb87d9a128d7104cb981734b9f57840 | |
parent | 165815c296076132f0399bd892fd879fc597ac83 (diff) | |
download | linux-d47db3e63679541f4dd4696ce4661b6917cb9684.tar.xz |
bcachefs: Delete redundant fsck_err()
'inode_has_wrong_backpointer'; we have more specific errors for every
case afterwards.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/inode.h | 9 | ||||
-rw-r--r-- | fs/bcachefs/namei.c | 9 |
2 files changed, 0 insertions, 18 deletions
diff --git a/fs/bcachefs/inode.h b/fs/bcachefs/inode.h index 77ad2d549541..82cec2836cbd 100644 --- a/fs/bcachefs/inode.h +++ b/fs/bcachefs/inode.h @@ -283,15 +283,6 @@ static inline void bch2_inode_nlink_set(struct bch_inode_unpacked *bi, int bch2_inode_nlink_inc(struct bch_inode_unpacked *); void bch2_inode_nlink_dec(struct btree_trans *, struct bch_inode_unpacked *); -static inline bool bch2_inode_should_have_single_bp(struct bch_inode_unpacked *inode) -{ - bool inode_has_bp = inode->bi_dir || inode->bi_dir_offset; - - return S_ISDIR(inode->bi_mode) || - inode->bi_subvol || - (!inode->bi_nlink && inode_has_bp); -} - struct bch_opts bch2_inode_opts_to_opts(struct bch_inode_unpacked *); void bch2_inode_opts_get(struct bch_io_opts *, struct bch_fs *, struct bch_inode_unpacked *); diff --git a/fs/bcachefs/namei.c b/fs/bcachefs/namei.c index c57da4029d36..7ba3dee7eb2d 100644 --- a/fs/bcachefs/namei.c +++ b/fs/bcachefs/namei.c @@ -733,15 +733,6 @@ static int bch2_check_dirent_inode_dirent(struct btree_trans *trans, return __bch2_fsck_write_inode(trans, target); } - if (bch2_inode_should_have_single_bp(target) && - !fsck_err(trans, inode_wrong_backpointer, - "dirent points to inode that does not point back:\n%s", - (bch2_bkey_val_to_text(&buf, c, d.s_c), - prt_newline(&buf), - bch2_inode_unpacked_to_text(&buf, target), - buf.buf))) - goto err; - struct bkey_s_c_dirent bp_dirent = bch2_bkey_get_iter_typed(trans, &bp_iter, BTREE_ID_dirents, SPOS(target->bi_dir, target->bi_dir_offset, target->bi_snapshot), |