bcachefs: readdir fixes
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 29 Apr 2025 18:30:01 +0000 (14:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 30 Apr 2025 15:49:34 +0000 (11:49 -0400)
commit5e63d579e752549dc256a952bcb35ade398ee921
treef996b7b4fe9ab17ba508f1b0465118639b620c08
parent2feaa92c7c0123013a2a3e3d02ff8a5f5a794e96
bcachefs: readdir fixes

- Don't call bch2_trans_relock() after dir_emit(); taking a transaction
  restart here will cause us to emit the same dirent to userspace twice

- Fix incorrect checking of the return value on dir_emit(): "true" means
  success, keep going, but bch2_dir_emit() needs to return true when
  we're finished iterating.

https://github.com/koverstreet/bcachefs/issues/867

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/dirent.c