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/symlink.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/symlink.c')
-rw-r--r-- | fs/udf/symlink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index d55989c871d..6ec99221e50 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c | |||
@@ -79,10 +79,12 @@ static int udf_symlink_filler(struct file *file, struct page *page) | |||
79 | char *symlink; | 79 | char *symlink; |
80 | int err = -EIO; | 80 | int err = -EIO; |
81 | char *p = kmap(page); | 81 | char *p = kmap(page); |
82 | struct udf_inode_info *iinfo; | ||
82 | 83 | ||
83 | lock_kernel(); | 84 | lock_kernel(); |
84 | if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { | 85 | iinfo = UDF_I(inode); |
85 | symlink = UDF_I(inode)->i_ext.i_data + UDF_I(inode)->i_lenEAttr; | 86 | if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
87 | symlink = iinfo->i_ext.i_data + iinfo->i_lenEAttr; | ||
86 | } else { | 88 | } else { |
87 | bh = sb_bread(inode->i_sb, udf_block_map(inode, 0)); | 89 | bh = sb_bread(inode->i_sb, udf_block_map(inode, 0)); |
88 | 90 | ||