diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-02-08 07:20:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:35 -0500 |
commit | 48d6d8ff7dca804536298e517298182c4a51c421 (patch) | |
tree | 8566ae59bdd01fb3568b6441b909d035dba7b61b /fs/udf/directory.c | |
parent | c0b344385fa05f6bea462e707fcba89f9e2776c2 (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/directory.c')
-rw-r--r-- | fs/udf/directory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/udf/directory.c b/fs/udf/directory.c index 949a5930f6d4..d8ceb44f4f22 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c | |||
@@ -81,12 +81,13 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | |||
81 | struct fileIdentDesc *fi; | 81 | struct fileIdentDesc *fi; |
82 | int i, num, block; | 82 | int i, num, block; |
83 | struct buffer_head *tmp, *bha[16]; | 83 | struct buffer_head *tmp, *bha[16]; |
84 | struct udf_inode_info *iinfo = UDF_I(dir); | ||
84 | 85 | ||
85 | fibh->soffset = fibh->eoffset; | 86 | fibh->soffset = fibh->eoffset; |
86 | 87 | ||
87 | if (UDF_I(dir)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { | 88 | if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
88 | fi = udf_get_fileident(UDF_I(dir)->i_ext.i_data - | 89 | fi = udf_get_fileident(iinfo->i_ext.i_data - |
89 | (UDF_I(dir)->i_efe ? | 90 | (iinfo->i_efe ? |
90 | sizeof(struct extendedFileEntry) : | 91 | sizeof(struct extendedFileEntry) : |
91 | sizeof(struct fileEntry)), | 92 | sizeof(struct fileEntry)), |
92 | dir->i_sb->s_blocksize, | 93 | dir->i_sb->s_blocksize, |