summaryrefslogtreecommitdiff
path: root/kernel/cpu_pm.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:05:44 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-06 12:36:17 -0800
commitc658ba1697add43676b8aabfdb4375fb398c2596 (patch)
treee2b2f48b24e9f5b477f4b2e9b49048748c2d1ffe /kernel/cpu_pm.c
parent2ea7b8d269eedecba0c584b8f1dc07541b65c75e (diff)
xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbedscrub-fix-return-value_2022-11-06
If we tried to repair something but the repair failed with -EDEADLOCK, 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 get all the resources we need, the repair fails and errors remain on the filesystem. Right now, repair returns the -EDEADLOCK to the caller as -EFSCORRUPTED, which results in XFS_SCRUB_OFLAG_CORRUPT being passed out to userspace. This is not correct because repair has not determined that anything is corrupt. If the repair had been invoked on an object that could be optimized but wasn't corrupt (OFLAG_PREEN), the inability to grab resources will be reported to userspace as corrupt metadata, and users will be unnecessarily alarmed that their suboptimal metadata turned into a corruption. Fix this by returning zero so that the results of the actual scrub will be copied back out to userspace. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'kernel/cpu_pm.c')
0 files changed, 0 insertions, 0 deletions