diff mbox series

[05/24] lustre: llite: use fatal_signal_pending in range_lock

Message ID 1662429337-18737-6-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to OpenSFS tree Sept 5, 2022 | expand

Commit Message

James Simmons Sept. 6, 2022, 1:55 a.m. UTC
From: Qian Yingjin <qian@ddn.com>

FIO io_uring failed with one file shared by two FIO processes
under newer kernels.
After analyzed, we found that range_lock() function return
-ERESTARTSYS when there pending signal on current process in
Lustre I/O. This causes -EINTR returned to the application.

we solve this bug by replacing @signal_pending(current) with
@fatal_signal_pending(current) in range_lock(). The range_lock()
function only returns -ERESTARTSYS when the current process has
fatal pending signal such as SIGKILL.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15994
Lustre-commit: 4c5b0b0967f052af3 ("LU-15994 llite: use fatal_signal_pending in range_lock")
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/48106
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/obdclass/range_lock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/lustre/obdclass/range_lock.c b/fs/lustre/obdclass/range_lock.c
index 2af6385..9731e57 100644
--- a/fs/lustre/obdclass/range_lock.c
+++ b/fs/lustre/obdclass/range_lock.c
@@ -159,7 +159,7 @@  int range_lock(struct range_lock_tree *tree, struct range_lock *lock)
 		spin_unlock(&tree->rlt_lock);
 		schedule();
 
-		if (signal_pending(current)) {
+		if (fatal_signal_pending(current)) {
 			range_unlock(tree, lock);
 			rc = -ERESTARTSYS;
 			goto out;