Skip to content

Commit

Permalink
xfs: tidy up xfs_set_inode32
Browse files Browse the repository at this point in the history
xfs_set_inode32() caught my eye because it had weird spacing around
the "-1's".  In cleaning that up, I realized that the assignment in
the declaration of "ino" is never used; it's rewritten before it
gets read.

Drop the ino initializer from its declaration since it's not used,
and move the agino initialization into the body of the function,
mostly so that we can have pretty whitespace and not exceed 80
columns.  :)

Signed-off-by: Eric Sandeen <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
sandeen authored and dchinner committed Jul 24, 2014
1 parent 9de67c3 commit 54aa61f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ xfs_set_inode32(struct xfs_mount *mp, xfs_agnumber_t agcount)
xfs_agnumber_t maxagi = 0;
xfs_sb_t *sbp = &mp->m_sb;
xfs_agnumber_t max_metadata;
xfs_agino_t agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks -1, 0);
xfs_ino_t ino = XFS_AGINO_TO_INO(mp, sbp->sb_agcount -1, agino);
xfs_agino_t agino;
xfs_ino_t ino;
xfs_perag_t *pag;

/* Calculate how much should be reserved for inodes to meet
Expand All @@ -628,6 +628,8 @@ xfs_set_inode32(struct xfs_mount *mp, xfs_agnumber_t agcount)
max_metadata = agcount;
}

agino = XFS_OFFBNO_TO_AGINO(mp, sbp->sb_agblocks - 1, 0);

for (index = 0; index < agcount; index++) {
ino = XFS_AGINO_TO_INO(mp, index, agino);

Expand Down

0 comments on commit 54aa61f

Please sign in to comment.