Commit b316c443 authored by Jan Kara's avatar Jan Kara

udf: Keep i_lenExtents consistent with the total length of extents

When rounding the last extent to blocksize in inode_getblk() we forgot
to update also i_lenExtents to match the new extent length. This
inconsistency can later confuse some assertion checks.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent e57191a8
...@@ -677,6 +677,9 @@ static sector_t inode_getblk(struct inode *inode, sector_t block, ...@@ -677,6 +677,9 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
elen = EXT_RECORDED_ALLOCATED | elen = EXT_RECORDED_ALLOCATED |
((elen + inode->i_sb->s_blocksize - 1) & ((elen + inode->i_sb->s_blocksize - 1) &
~(inode->i_sb->s_blocksize - 1)); ~(inode->i_sb->s_blocksize - 1));
iinfo->i_lenExtents =
ALIGN(iinfo->i_lenExtents,
inode->i_sb->s_blocksize);
udf_write_aext(inode, &cur_epos, &eloc, elen, 1); udf_write_aext(inode, &cur_epos, &eloc, elen, 1);
} }
newblock = udf_get_lb_pblock(inode->i_sb, &eloc, offset); newblock = udf_get_lb_pblock(inode->i_sb, &eloc, offset);
......
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