From 294012fb070e33fb4a0aace7ac8d26357b705cf4 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 10 Aug 2023 07:48:08 -0700 Subject: 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 Reviewed-by: Dave Chinner --- fs/xfs/scrub/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/xfs/scrub/scrub.c') 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; } -- cgit v1.2.3