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 | 17308539507c710682409d429746695c74c51336 (patch) | |
tree | 516703b9b95bd03ced2ef591eaaea974f10404a9 /fs/xfs/scrub/scrub.c | |
parent | d7a74cad8f45133935c59ed0adf949f85238624b (diff) | |
download | lwn-17308539507c710682409d429746695c74c51336.tar.gz lwn-17308539507c710682409d429746695c74c51336.zip |
xfs: get our own reference to inodes that we want to scrub
When we want to scrub a file, get our own reference to the inode
unconditionally. This will make disposal rules simpler in the long run.
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 | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index e6962cf651d9..91de2b53ca31 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -167,8 +167,6 @@ xchk_teardown( struct xfs_scrub *sc, int error) { - struct xfs_inode *ip_in = XFS_I(file_inode(sc->file)); - xchk_ag_free(sc, &sc->sa); if (sc->tp) { if (error == 0 && (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)) @@ -180,9 +178,7 @@ xchk_teardown( if (sc->ip) { if (sc->ilock_flags) xfs_iunlock(sc->ip, sc->ilock_flags); - if (sc->ip != ip_in && - !xfs_internal_inum(sc->mp, sc->ip->i_ino)) - xchk_irele(sc, sc->ip); + xchk_irele(sc, sc->ip); sc->ip = NULL; } if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) |