aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/dir.c
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2022-09-01 21:35:01 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 20:26:07 -0700
commit59a16786fa7a77dd383a62271e0102f1455bccea (patch)
treeb45c37b26baef4f82c0510a5109168dbbf683ca8 /fs/udf/dir.c
parentreiserfs: replace ll_rw_block() (diff)
downloadlinux-dev-59a16786fa7a77dd383a62271e0102f1455bccea.tar.xz
linux-dev-59a16786fa7a77dd383a62271e0102f1455bccea.zip
udf: replace ll_rw_block()
ll_rw_block() is not safe for the sync read path because it cannot guarantee that submitting read IO if the buffer has been locked. We could get false positive EIO after wait_on_buffer() if the buffer has been locked by others. So stop using ll_rw_block(). We also switch to new bh_readahead_batch() helper for the buffer array readahead path. Link: https://lkml.kernel.org/r/20220901133505.2510834-11-yi.zhang@huawei.com Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/udf/dir.c')
-rw-r--r--fs/udf/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index cad3772f9dbe..be640f4b2f2c 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -130,7 +130,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
brelse(tmp);
}
if (num) {
- ll_rw_block(REQ_OP_READ | REQ_RAHEAD, num, bha);
+ bh_readahead_batch(num, bha, REQ_RAHEAD);
for (i = 0; i < num; i++)
brelse(bha[i]);
}