From ff116fc8d1d43927c7651b91d5aec41eb30c4429 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 8 May 2007 00:35:14 -0700 Subject: 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 Acked-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/udf/super.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'fs/udf/super.c') 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 udf_count_free_table(struct super_block *sb, struct inode * table) { unsigned int accum = 0; - uint32_t extoffset, elen; - kernel_lb_addr bloc, eloc; + uint32_t elen; + kernel_lb_addr eloc; int8_t etype; - struct buffer_head *bh = NULL; + struct extent_position epos; lock_kernel(); - bloc = UDF_I_LOCATION(table); - extoffset = sizeof(struct unallocSpaceEntry); + epos.block = UDF_I_LOCATION(table); + epos.offset = sizeof(struct unallocSpaceEntry); + epos.bh = NULL; - while ((etype = udf_next_aext(table, &bloc, &extoffset, &eloc, &elen, &bh, 1)) != -1) - { + while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1) accum += (elen >> table->i_sb->s_blocksize_bits); - } - udf_release_data(bh); + udf_release_data(epos.bh); unlock_kernel(); -- cgit v1.2.3-58-ga151