diff options
-rw-r--r-- | fs/xfs/scrub/rmap_repair.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_icache.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_icache.h | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c index 16b4a2f7ed7c..806f49431a4f 100644 --- a/fs/xfs/scrub/rmap_repair.c +++ b/fs/xfs/scrub/rmap_repair.c @@ -582,7 +582,8 @@ xrep_rmap_scan_inode( int error; /* Grab inode and lock it so we can scan it. */ - error = xfs_iget(mp, rr->sc->tp, ino, XFS_IGET_DONTCACHE, 0, &ip); + error = xfs_iget(mp, rr->sc->tp, ino, + XFS_IGET_DONTCACHE | XFS_IGET_UNLINKED, 0, &ip); if (error) return error; diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 5fd13ba2482c..d9aa24641de7 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -438,6 +438,9 @@ xfs_iget_check_free_state( struct xfs_inode *ip, int flags) { + if (flags & XFS_IGET_UNLINKED) + return 0; + /* * Unlinked inodes awaiting inactivation must not be reused until we * have a chance to clear the on-disk metadata. diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h index 1f94ef72fffb..160e895c877c 100644 --- a/fs/xfs/xfs_icache.h +++ b/fs/xfs/xfs_icache.h @@ -34,6 +34,11 @@ struct xfs_eofblocks { #define XFS_IGET_UNTRUSTED 0x2 #define XFS_IGET_DONTCACHE 0x4 #define XFS_IGET_INCORE 0x8 /* don't read from disk or reinit */ +/* + * Return unlinked inodes. Callers must disable inactivation prior to using + * this. This is one of those weird repair things; don't use it. + */ +#define XFS_IGET_UNLINKED 0x10 int xfs_iget(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t ino, uint flags, uint lock_flags, xfs_inode_t **ipp); |