From: Qian Yingjin Date: Tue, 2 Aug 2022 09:14:48 +0000 (-0400) Subject: LU-15994 llite: use fatal_signal_pending in range_lock X-Git-Tag: 2.15.51~1 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4c5b0b0967f052af33cc5cdb4e77d736f04bae56;ds=sidebyside LU-15994 llite: use fatal_signal_pending in range_lock FIO io_uring failed with one file shared by two FIO processes under Unubtu 2204 kernel. 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. Signed-off-by: Qian Yingjin Change-Id: I0a0be8fa3b4ba5c89f7866286b2bdc6595f18026 Reviewed-on: https://review.whamcloud.com/48106 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/range_lock.c b/lustre/obdclass/range_lock.c index ae3ed9ab..86a8fb5 100644 --- a/lustre/obdclass/range_lock.c +++ b/lustre/obdclass/range_lock.c @@ -166,7 +166,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); GOTO(out, rc = -ERESTARTSYS); }