diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-08-10 07:48:08 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-08-10 07:48:08 -0700 |
commit | 294012fb070e33fb4a0aace7ac8d26357b705cf4 (patch) | |
tree | 9f7238f717a67b2968c5f561563754b3dae61754 /fs/xfs/scrub/scrub.c | |
parent | 17308539507c710682409d429746695c74c51336 (diff) | |
download | lwn-294012fb070e33fb4a0aace7ac8d26357b705cf4.tar.gz lwn-294012fb070e33fb4a0aace7ac8d26357b705cf4.zip |
xfs: wrap ilock/iunlock operations on sc->ip
Scrub tracks the resources that it's holding onto in the xfs_scrub
structure. This includes the inode being checked (if applicable) and
the inode lock state of that inode. Replace the open-coded structure
manipulation with a trivial helper to eliminate sources of error.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/scrub.c')
-rw-r--r-- | fs/xfs/scrub/scrub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index 91de2b53ca31..2e87739c8ec1 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -177,7 +177,7 @@ xchk_teardown( } if (sc->ip) { if (sc->ilock_flags) - xfs_iunlock(sc->ip, sc->ilock_flags); + xchk_iunlock(sc, sc->ilock_flags); xchk_irele(sc, sc->ip); sc->ip = NULL; } |