aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/partition.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:35 -0500
commit48d6d8ff7dca804536298e517298182c4a51c421 (patch)
tree8566ae59bdd01fb3568b6441b909d035dba7b61b /fs/udf/partition.c
parentc0b344385fa05f6bea462e707fcba89f9e2776c2 (diff)
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 cfe213fd3113..fc533345ab89 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,
55 struct udf_sb_info *sbi = UDF_SB(sb); 55 struct udf_sb_info *sbi = UDF_SB(sb);
56 struct udf_part_map *map; 56 struct udf_part_map *map;
57 struct udf_virtual_data *vdata; 57 struct udf_virtual_data *vdata;
58 struct udf_inode_info *iinfo;
58 59
59 map = &sbi->s_partmaps[partition]; 60 map = &sbi->s_partmaps[partition];
60 vdata = &map->s_type_specific.s_virtual; 61 vdata = &map->s_type_specific.s_virtual;
@@ -88,15 +89,14 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
88 89
89 brelse(bh); 90 brelse(bh);
90 91
91 if (UDF_I(sbi->s_vat_inode)->i_location.partitionReferenceNum == 92 iinfo = UDF_I(sbi->s_vat_inode);
92 partition) { 93 if (iinfo->i_location.partitionReferenceNum == partition) {
93 udf_debug("recursive call to udf_get_pblock!\n"); 94 udf_debug("recursive call to udf_get_pblock!\n");
94 return 0xFFFFFFFF; 95 return 0xFFFFFFFF;
95 } 96 }
96 97
97 return udf_get_pblock(sb, loc, 98 return udf_get_pblock(sb, loc,
98 UDF_I(sbi->s_vat_inode)->i_location. 99 iinfo->i_location.partitionReferenceNum,
99 partitionReferenceNum,
100 offset); 100 offset);
101} 101}
102 102