diff options
author | Alan Huang <mmpgouride@gmail.com> | 2025-08-06 14:25:56 +0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-08-06 13:13:28 -0400 |
commit | f682dff72e04de1b61c9d39ad301650ec9f41f85 (patch) | |
tree | 2b3d2bd07fc47b2ad0c225d8b6c7cf8c66571d0a /fs/bcachefs/btree_trans_commit.c | |
parent | 198c4d8e24bc213ba888afd0e6bd8e7c7fa207f8 (diff) |
bcachefs: Fix readahead involved deadlock
readahead first lock the folio, then invokes aops->readahead, which
locks the two state lock to block subsequent direct I/O. However,
direct IO or bchfs_fpunch first lock the two state lock to block
subsequent buffered I/O, and then lock the folio to invalidate or
truncate it. Therefore, there is a deadlock:
thread1 thread2
lock folio bch2_pagecache_block_get
bch2_pagecache_add_get lock folio
Reported-by: syzbot+23e4a7772eb9a9715b85@syzkaller.appspotmail.com
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions