summaryrefslogtreecommitdiff
path: root/scripts/clang-tools/gen_compile_commands.py
diff options
context:
space:
mode:
authorGabriel Shahrouzi <gshahrouzi@gmail.com>2025-04-12 21:39:33 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-13 14:56:28 +0300
commitd62922ba3cfc01dc42e853f90b93c525751e9383 (patch)
tree01b094dda3e3558a38ef887a8e276d038ea7483e /scripts/clang-tools/gen_compile_commands.py
parent55fd97fbc4744a43fb2d134908e481266cf33bda (diff)
downloadlinux-d62922ba3cfc01dc42e853f90b93c525751e9383.tar.xz
bcachefs: Prevent granting write refs when filesystem is read-only
Fix a shutdown WARNING in bch2_dev_free caused by active write I/O references (ca->io_ref[WRITE]) on a device being freed. The problem occurs when: - The filesystem is marked read-only (BCH_FS_rw clear in c->flags). - A subsequent operation (e.g., error handling for device removal) incorrectly tries to grant write references back to a device. - During final shutdown, the read-only flag causes the system to skip stopping write I/O references (bch2_dev_io_ref_stop(ca, WRITE)). - The leftover active write reference triggers the WARN_ON in bch2_dev_free. Prevent this by checking if the filesystem is read-only before attempting to grant write references to a device in the problematic code path. Ensure consistency between the filesystem state flag and the device I/O reference state during shutdown. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions