diff options
author | Jan Kara <jack@suse.cz> | 2007-05-08 03:35:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:21 -0400 |
commit | ff116fc8d1d43927c7651b91d5aec41eb30c4429 (patch) | |
tree | 9b452298e6f070be35b2d366ce4a10e4a1384d17 /fs/udf/super.c | |
parent | 60448b1d6db4e82946ff9a2ac88df341f5fa87a2 (diff) |
UDF: introduce struct extent_position
Introduce a structure extent_position to store a position of an extent and
the corresponding buffer_head in one place.
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r-- | fs/udf/super.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 023b304fdd99..dafa05f0110b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -1883,21 +1883,20 @@ static unsigned int | |||
1883 | udf_count_free_table(struct super_block *sb, struct inode * table) | 1883 | udf_count_free_table(struct super_block *sb, struct inode * table) |
1884 | { | 1884 | { |
1885 | unsigned int accum = 0; | 1885 | unsigned int accum = 0; |
1886 | uint32_t extoffset, elen; | 1886 | uint32_t elen; |
1887 | kernel_lb_addr bloc, eloc; | 1887 | kernel_lb_addr eloc; |
1888 | int8_t etype; | 1888 | int8_t etype; |
1889 | struct buffer_head *bh = NULL; | 1889 | struct extent_position epos; |
1890 | 1890 | ||
1891 | lock_kernel(); | 1891 | lock_kernel(); |
1892 | 1892 | ||
1893 | bloc = UDF_I_LOCATION(table); | 1893 | epos.block = UDF_I_LOCATION(table); |
1894 | extoffset = sizeof(struct unallocSpaceEntry); | 1894 | epos.offset = sizeof(struct unallocSpaceEntry); |
1895 | epos.bh = NULL; | ||
1895 | 1896 | ||
1896 | while ((etype = udf_next_aext(table, &bloc, &extoffset, &eloc, &elen, &bh, 1)) != -1) | 1897 | while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) |
1897 | { | ||
1898 | accum += (elen >> table->i_sb->s_blocksize_bits); | 1898 | accum += (elen >> table->i_sb->s_blocksize_bits); |
1899 | } | 1899 | udf_release_data(epos.bh); |
1900 | udf_release_data(bh); | ||
1901 | 1900 | ||
1902 | unlock_kernel(); | 1901 | unlock_kernel(); |
1903 | 1902 | ||