diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-06-24 11:35:17 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-06-24 11:35:17 +1000 |
commit | 7b6259e7a83647948fa33a736cc832310c8d85aa (patch) | |
tree | 99bb872b179a93f5e32b51f312029abb1237b055 /fs/xfs/xfs_ialloc.c | |
parent | 1920779e67cbf5ea8afef317777c5bf2b8096188 (diff) | |
download | op-kernel-dev-7b6259e7a83647948fa33a736cc832310c8d85aa.zip op-kernel-dev-7b6259e7a83647948fa33a736cc832310c8d85aa.tar.gz |
xfs: remove block number from inode lookup code
The block number comes from bulkstat based inode lookups to shortcut
the mapping calculations. We ar enot able to trust anything from
bulkstat, so drop the block number as well so that the correct
lookups and mappings are always done.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index d8fd366..c7142a0 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -1355,22 +1355,6 @@ xfs_imap( } /* - * If we get a block number passed we can use it to - * find the buffer easily. - */ - if (imap->im_blkno) { - offset = XFS_INO_TO_OFFSET(mp, ino); - ASSERT(offset < mp->m_sb.sb_inopblock); - - cluster_agbno = xfs_daddr_to_agbno(mp, imap->im_blkno); - offset += (agbno - cluster_agbno) * mp->m_sb.sb_inopblock; - - imap->im_len = XFS_FSB_TO_BB(mp, blks_per_cluster); - imap->im_boffset = (ushort)(offset << mp->m_sb.sb_inodelog); - return 0; - } - - /* * If the inode chunks are aligned then use simple maths to * find the location. Otherwise we have to do a btree * lookup to find the location. |