xfs: wrap ilock/iunlock operations on sc->ip
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:08 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:08 +0000 (07:48 -0700)
commit294012fb070e33fb4a0aace7ac8d26357b705cf4
tree9f7238f717a67b2968c5f561563754b3dae61754
parent17308539507c710682409d429746695c74c51336
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>
fs/xfs/scrub/bmap.c
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/inode.c
fs/xfs/scrub/parent.c
fs/xfs/scrub/quota.c
fs/xfs/scrub/rtbitmap.c
fs/xfs/scrub/scrub.c