]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] fix extent corruption in xfs_iext_irec_compact_full()
authorLachlan McIlroy <lachlan@sgi.com>
Mon, 23 Jun 2008 03:25:02 +0000 (13:25 +1000)
committerNiv Sardi <xaiki@debian.org>
Mon, 28 Jul 2008 06:58:56 +0000 (16:58 +1000)
commit6f6f3af72e188a064017143eda82489c3b2c1f0f
treeea4021d53cf15a295bee5b83a31134ba2e6a8cb7
parent4c7117b481f58f84084f17cf8ee123476f26c36e
[XFS] fix extent corruption in xfs_iext_irec_compact_full()

This function is used to compact the indirect extent list by moving
extents from one page to the previous to fill them up. After we move some
extents to an earlier page we need to shuffle the remaining extents to the
start of the page. The actual bug here is the second argument to memmove()
needs to index past the extents, that were copied to the previous page,
and move the remaining extents. For pages that are already full (ie
ext_avail == 0) the compaction code has no net effect so don't do it.

SGI-PV: 983337

SGI-Modid: xfs-linux-melb:xfs-kern:31332a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
fs/xfs/xfs_inode.c