bcachefs: Change bch2_dev_lookup() to not use lookup_bdev()
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 16 Feb 2022 11:23:06 +0000 (06:23 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commitbf7e49a4ae564108d08d314e514a6f802748d73b
tree230e1732d8563db748119f68bc787fff8cfce918
parent2232fa397c2be92ed80ee48d52de98a1a2916b06
bcachefs: Change bch2_dev_lookup() to not use lookup_bdev()

bch2_dev_lookup() is used from the extended attribute set methods, for
setting the target options, where we're already holding an inode lock -
it turns out pathname lookups also take inode locks, so that was
susceptible to deadlocks.

Fortunately we already stash the device name in ca->name. This does
change user-visible behaviour though: instead of specifying e.g.
/dev/sda1, user must now specify sda1.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/super.c