Commit 4a5b1b53 authored by Matthew Bobrowski's avatar Matthew Bobrowski Committed by Yang Yingliang
Browse files

ext4: update direct I/O read lock pattern for IOCB_NOWAIT

stable inclusion
from stable-v4.19.93
commit 0af1ad3b1ce50fdcb0996c0cd918ce08dc82c14c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4MIQ0


CVE: NA

-----------------------------------------------

[ Upstream commit 548feebe ]

This patch updates the lock pattern in ext4_direct_IO_read() to not
block on inode lock in cases of IOCB_NOWAIT direct I/O reads. The
locking condition implemented here is similar to that of 942491c9
("xfs: fix AIM7 regression").

Fixes: 16c54688 ("ext4: Allow parallel DIO reads")
Signed-off-by: default avatarMatthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarRitesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/c5d5e759f91747359fbd2c6f9a36240cf75ad79f.1572949325.git.mbobrowski@mbobrowski.org


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 5d00e2bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment