From: Darrick J. Wong Date: Mon, 7 Nov 2022 01:03:16 +0000 (-0800) Subject: xfs: return EINTR when a fatal signal terminates scrub X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a7a0f9a5503f4da3b6489583ce4ef9abc0ab2475;p=linux.git xfs: return EINTR when a fatal signal terminates scrub If the program calling online fsck is terminated with a fatal signal, bail out to userspace by returning EINTR, not EAGAIN. EAGAIN is used by scrubbers to indicate that we should try again with more resources locked, and not to indicate that the operation was cancelled. The miswiring is mostly harmless, but it shows up in the trace data. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner --- diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h index 454145db10e71..b73648d81d230 100644 --- a/fs/xfs/scrub/common.h +++ b/fs/xfs/scrub/common.h @@ -25,7 +25,7 @@ xchk_should_terminate( if (fatal_signal_pending(current)) { if (*error == 0) - *error = -EAGAIN; + *error = -EINTR; return true; } return false;