]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Refactor bch2_check_dirent_target()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 20 Mar 2025 15:06:50 +0000 (11:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 24 Mar 2025 13:50:36 +0000 (09:50 -0400)
commit9b0d00a3693bbab49dcec00dd981c8661d6011bf
tree678809edc45dd58efc19346e3fca0b8895d00c56
parent758ea4ff812b4dfd4cef6dba0eb4b0025a7b147e
bcachefs: Refactor bch2_check_dirent_target()

Prep work for calling bch2_check_dirent_target() from bch2_lookup().

- Add an inline wrapper, if the target and backpointer match we can skip
  the function call.

- We don't (yet?) want to remove the dirent we did the lookup from (when
  we find a directory or subvol with multiple valid dirents pointing to
  it), we can defer on that until later. For now, add an "are we in
  fsck?" parameter.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fsck.c
fs/bcachefs/inode.h
fs/bcachefs/namei.c
fs/bcachefs/namei.h