]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: move inode number validation to xfs_meta_iget
authorChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 05:10:34 +0000 (07:10 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 06:00:43 +0000 (08:00 +0200)
Source kernel commit: 14eb1a7de9f4531fa27923e36e4f4da64dc38b69

Verifying the inode number in iget makes more sense than in lookup.
(shouldn't we be doing this for all inodes in xfs_iget?)

Signed-off-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_imeta.c

index e8dc94938073cdd12928b191dcf648167ce477b9..ea75989deebc1c8462d0b0dbc65f97ba26d9f5f8 100644 (file)
@@ -874,11 +874,6 @@ xfs_imeta_lookup(
        if (error)
                return error;
 
-       if (!xfs_imeta_verify(mp, ino)) {
-               xfs_fs_mark_sick(mp, XFS_SICK_FS_METADIR);
-               return -EFSCORRUPTED;
-       }
-
        *inop = ino;
        return 0;
 }