xfs
[Top] [All Lists]

[PATCH 09/12] repair: kill check_inode_block

To: xfs@xxxxxxxxxxx
Subject: [PATCH 09/12] repair: kill check_inode_block
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 02 Dec 2011 12:46:28 -0500
References: <20111202174619.179530033@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.48-1
It's a wrapper around check_aginode_block, but given that the only caller
already has the agno and agbno at hand it isn't overly useful.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: xfsprogs-dev/repair/dino_chunks.c
===================================================================
--- xfsprogs-dev.orig/repair/dino_chunks.c      2011-11-14 20:04:08.847867904 
+0100
+++ xfsprogs-dev/repair/dino_chunks.c   2011-11-14 20:04:59.487867601 +0100
@@ -72,14 +72,6 @@ check_aginode_block(xfs_mount_t      *mp,
        return(cnt);
 }
 
-int
-check_inode_block(xfs_mount_t          *mp,
-                       xfs_ino_t       ino)
-{
-       return(check_aginode_block(mp, XFS_INO_TO_AGNO(mp, ino),
-                                       XFS_INO_TO_AGBNO(mp, ino)));
-}
-
 /*
  * tries to establish if the inode really exists in a valid
  * inode chunk.  returns number of new inodes if things are good
@@ -145,10 +137,9 @@ verify_inode_chunk(xfs_mount_t             *mp,
         */
        if (XFS_IALLOC_BLOCKS(mp) == 1)  {
                if (agbno > max_agbno)
-                       return(0);
-
-               if (check_inode_block(mp, ino) == 0)
-                       return(0);
+                       return 0;
+               if (check_aginode_block(mp, agno, agino) == 0)
+                       return 0;
 
                pthread_mutex_lock(&ag_locks[agno]);
 

<Prev in Thread] Current Thread [Next in Thread>