]> git.dujemihanovic.xyz Git - linux.git/commit
bcachefs: Fix BCH_IOCTL_FSCK_OFFLINE for encrypted filesystems
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Apr 2024 02:23:29 +0000 (22:23 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Apr 2024 17:50:22 +0000 (13:50 -0400)
commit374b3d38feff4a1cb4ecadace9bd915ffd91fe4b
tree06322f42cee6e39f090ae89274d513dfbcd44a77
parentcf979fca9a05d7d0b116257e5c4dc12b6bb7eb3a
bcachefs: Fix BCH_IOCTL_FSCK_OFFLINE for encrypted filesystems

To open an encrypted filesystem, we use request_key() to get the
encryption key from the user's keyring - but request_key() needs to
happen in the context of the process that invoked the ioctl.

This easily fixed by using bch2_fs_open() in nostart mode.

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