From: Darrick J. Wong <djwong@xxxxxxxxxx> If we tried to repair something but the repair failed with -EDEADLOCK or -EAGAIN, that means that the repair function couldn't grab some resource it needed and wants us to try again. If we try again (with TRY_HARDER) but still can't do it, exit back to userspace, since xfs_scrub_metadata requires xrep_attempt to return -EAGAIN. This makes the return value diagnostics look less weird, and fixes a wart that remains from very early in the repair implementation. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/scrub/repair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index f6c4cb013346..34fc0dc5f200 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -69,9 +69,9 @@ xrep_attempt( /* * We tried harder but still couldn't grab all the resources * we needed to fix it. The corruption has not been fixed, - * so report back to userspace. + * so exit to userspace. */ - return -EFSCORRUPTED; + return 0; case -EAGAIN: /* Repair functions should return EDEADLOCK, not EAGAIN. */ ASSERT(0);