Commit b31c9ed9 authored by Fabian Frederick's avatar Fabian Frederick Committed by Jan Kara

udf: remove next_epos from udf_update_extent_cache()

udf_update_extent_cache() is only called from inode_bmap()
with 1 for next_epos
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 7ed0fbd7
...@@ -109,7 +109,7 @@ static int udf_read_extent_cache(struct inode *inode, loff_t bcount, ...@@ -109,7 +109,7 @@ static int udf_read_extent_cache(struct inode *inode, loff_t bcount,
/* Add extent to extent cache */ /* Add extent to extent cache */
static void udf_update_extent_cache(struct inode *inode, loff_t estart, static void udf_update_extent_cache(struct inode *inode, loff_t estart,
struct extent_position *pos, int next_epos) struct extent_position *pos)
{ {
struct udf_inode_info *iinfo = UDF_I(inode); struct udf_inode_info *iinfo = UDF_I(inode);
...@@ -118,18 +118,15 @@ static void udf_update_extent_cache(struct inode *inode, loff_t estart, ...@@ -118,18 +118,15 @@ static void udf_update_extent_cache(struct inode *inode, loff_t estart,
__udf_clear_extent_cache(inode); __udf_clear_extent_cache(inode);
if (pos->bh) if (pos->bh)
get_bh(pos->bh); get_bh(pos->bh);
memcpy(&iinfo->cached_extent.epos, pos, memcpy(&iinfo->cached_extent.epos, pos, sizeof(struct extent_position));
sizeof(struct extent_position));
iinfo->cached_extent.lstart = estart; iinfo->cached_extent.lstart = estart;
if (next_epos)
switch (iinfo->i_alloc_type) { switch (iinfo->i_alloc_type) {
case ICBTAG_FLAG_AD_SHORT: case ICBTAG_FLAG_AD_SHORT:
iinfo->cached_extent.epos.offset -= iinfo->cached_extent.epos.offset -= sizeof(struct short_ad);
sizeof(struct short_ad);
break; break;
case ICBTAG_FLAG_AD_LONG: case ICBTAG_FLAG_AD_LONG:
iinfo->cached_extent.epos.offset -= iinfo->cached_extent.epos.offset -= sizeof(struct long_ad);
sizeof(struct long_ad); break;
} }
spin_unlock(&iinfo->i_extent_cache_lock); spin_unlock(&iinfo->i_extent_cache_lock);
} }
...@@ -2289,7 +2286,7 @@ int8_t inode_bmap(struct inode *inode, sector_t block, ...@@ -2289,7 +2286,7 @@ int8_t inode_bmap(struct inode *inode, sector_t block,
lbcount += *elen; lbcount += *elen;
} while (lbcount <= bcount); } while (lbcount <= bcount);
/* update extent cache */ /* update extent cache */
udf_update_extent_cache(inode, lbcount - *elen, pos, 1); udf_update_extent_cache(inode, lbcount - *elen, pos);
*offset = (bcount + *elen - lbcount) >> blocksize_bits; *offset = (bcount + *elen - lbcount) >> blocksize_bits;
return etype; return etype;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment