summaryrefslogtreecommitdiff
path: root/fs/udf/partition.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 04:20:44 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:35 -0800
commit48d6d8ff7dca804536298e517298182c4a51c421 (patch)
tree8566ae59bdd01fb3568b6441b909d035dba7b61b /fs/udf/partition.c
parentc0b344385fa05f6bea462e707fcba89f9e2776c2 (diff)
downloadlinux-3.10-48d6d8ff7dca804536298e517298182c4a51c421.tar.gz
linux-3.10-48d6d8ff7dca804536298e517298182c4a51c421.tar.bz2
linux-3.10-48d6d8ff7dca804536298e517298182c4a51c421.zip
udf: cache struct udf_inode_info
cache UDF_I(struct inode *) return values when there are at least 2 uses in one function Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/partition.c')
-rw-r--r--fs/udf/partition.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/udf/partition.c b/fs/udf/partition.c
index cfe213fd311..fc533345ab8 100644
--- a/fs/udf/partition.c
+++ b/fs/udf/partition.c
@@ -55,6 +55,7 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
struct udf_sb_info *sbi = UDF_SB(sb);
struct udf_part_map *map;
struct udf_virtual_data *vdata;
+ struct udf_inode_info *iinfo;
map = &sbi->s_partmaps[partition];
vdata = &map->s_type_specific.s_virtual;
@@ -88,15 +89,14 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
brelse(bh);
- if (UDF_I(sbi->s_vat_inode)->i_location.partitionReferenceNum ==
- partition) {
+ iinfo = UDF_I(sbi->s_vat_inode);
+ if (iinfo->i_location.partitionReferenceNum == partition) {
udf_debug("recursive call to udf_get_pblock!\n");
return 0xFFFFFFFF;
}
return udf_get_pblock(sb, loc,
- UDF_I(sbi->s_vat_inode)->i_location.
- partitionReferenceNum,
+ iinfo->i_location.partitionReferenceNum,
offset);
}