]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_inode_fork.c
xfs: fix the wrong new_size/rnew_size at xfs_iext_realloc_direct()
authorDave Chinner <dchinner@redhat.com>
Wed, 13 Nov 2013 06:40:36 +0000 (06:40 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 13 Nov 2013 17:08:19 +0000 (11:08 -0600)
commit3e23516ae60421652fd41354307a6a5181d401eb
tree310a8bc75dfedf7950787c23abade288a90219e7
parent12864fd992dd5d6bc3c089aeb6422c8d235a28f0
xfs: fix the wrong new_size/rnew_size at xfs_iext_realloc_direct()

At xfs_iext_realloc_direct(), the new_size is changed by adding
if_bytes if originally the extent records are stored at the inline
extent buffer, and we have to switch from it to a direct extent
list for those new allocated extents, this is wrong.

This patch fix above problem and revise the new_size comments at
xfs_iext_realloc_direct() to make it more readable.  Also, fix the
comments while switching from the inline extent buffer to a direct
extent list to reflect this change.

Ported from kernel commit 17ec81c1.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
libxfs/xfs_inode_fork.c