Whamcloud - gitweb
libext2fs: rewind extent pointer when totally deleting an extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 7 Oct 2013 13:35:22 +0000 (09:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 7 Oct 2013 13:35:25 +0000 (09:35 -0400)
commit5d494038eede1bb538441dedf4207529629154b3
tree93b8d6b43614ed1013313eb45195790c5ead5f34
parent580d8a0933e9fe390a445c50358af852345c0a47
libext2fs: rewind extent pointer when totally deleting an extent

During a punch operation, if we decide to delete an extent out of the
extent tree, the subsequent extents are moved on top of the current
extent (that is to say, they're memmmove'd down one slot).  Therefore
it is not correct to advance to the next leaf because that means we
miss half the extents in the range!  Rereading the current pointer
should be fine.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/punch.c