mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-29 11:33:19 +00:00
This caller of scoutfs_get_block is now actively used in el10 and the WARN_ON_ONCE(!lock) in data.c:567 triggers. Add the scoutfs_per_task_add_excl/del calls in scoutfs_readpage, scoutfs_readpages, and scoutfs_readahead to register the cluster lock for scoutfs_get_block_read. Add unconditionally rather than guarded by the add_excl return, since these methods can be reached reentrantly from a top-level read that already added the entry. Skipping the I/O in that case left BUG_ON(!list_empty(pages)) in scoutfs_readpages and the page locked in scoutfs_readpage. Move scoutfs_per_task_del before scoutfs_unlock to match the ordering used by file.c read/write paths. Signed-off-by: Auke Kok <auke.kok@versity.com>