diff options
| author | Julian Sun <sunjunchao@bytedance.com> | 2026-10-15 17:11:05 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-15 06:39:14 -0600 |
| commit | 1b1be9ea4e34ccede1e7cf9ff2b6317328a5b6ad (patch) | |
| tree | 6bc4349fa6249f0d068fb8d51cdeef271c287f74 /rust/kernel | |
| parent | a08bf4b9f87898628e70882430b8dd4260730dba (diff) | |
block: take the inode lock for buffered write fallback
Commit c0e473a0d226 ("block: fix race between set_blocksize and read
paths") added shared inode locking around ordinary buffered writes,
but missed the direct-I/O fallback path.
Move the lock into blkdev_buffered_write() so both paths serialize
with set_blocksize().
Also correct the comment claiming that this path takes invalidate_lock;
it only takes i_rwsem.
Fixes: c0e473a0d226 ("block: fix race between set_blocksize and read paths")
Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Link: https://patch.msgid.link/20261015091105.1315605-3-sunjunchao@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions
