]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: add nowait mode for ext4_getblk()
authorZhang Yi <yi.zhang@huawei.com>
Sun, 24 Apr 2022 14:09:35 +0000 (22:09 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 17 May 2022 18:17:40 +0000 (14:17 -0400)
commit953d6adb145300821e4b26ca3b8a8bb0311073ae
tree248126608f619ff1c351c3c048560cfcd1ecc979
parent2897f54fe330f0006f7613e1db53271d3a470cf6
ext4: add nowait mode for ext4_getblk()

Current ext4_getblk() might sleep if some resources are not valid or
could be race with a concurrent extents modifing procedure. So we
cannot call ext4_getblk() and ext4_map_blocks() to get map blocks in
the atomic context in some fast path (e.g. the upcoming procedure of
getting symlink external block in the RCU context), even if the map
extents have already been check and cached.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20220424140936.1898920-2-yi.zhang@huawei.com
fs/ext4/ext4.h
fs/ext4/inode.c