]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix a dio write regression
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 23 Aug 2012 02:10:38 +0000 (20:10 -0600)
committerChris Mason <chris.mason@oracle.com>
Tue, 28 Aug 2012 20:53:41 +0000 (16:53 -0400)
commita983af407f71505bf6587052658e12f0cf9cfb45
treeb0e14cbc951996a4b33fa81e7a19d092e08398d5
parent03898ca915a52f4bdbf76f8f2e5c7d4691a08f73
Btrfs: fix a dio write regression

This bug is introduced by commit 3b8bde746f6f9bd36a9f05f5f3b6e334318176a9
(Btrfs: lock extents as we map them in DIO).

In dio write, we should unlock the section which we didn't do IO on in case that
we fall back to buffered write.  But we need to not only unlock the section
but also cleanup reserved space for the section.

This bug was found while running xfstests 133, with this 133 no longer complains.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c