]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix the mismatch of page->mapping
authorLiu Bo <liubo2009@cn.fujitsu.com>
Thu, 29 Mar 2012 13:57:44 +0000 (09:57 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 29 Mar 2012 13:57:44 +0000 (09:57 -0400)
commitd75807fa0db8b4761e7d972aa18328d97b2d6230
treed0c9c7be653b3306f9cfb76ba9805f36c9295e37
parent9244280e8670874d8c46800d4f1afeaee1e7bdd9
Btrfs: fix the mismatch of page->mapping

commit 277e723e9b767842842d46f3223a4185ece88fb0
(Btrfs: fix deadlock on page lock when doing auto-defragment)
fixes the deadlock on page, but it also introduces another bug.

A page may have been truncated after unlock & lock.
So we need to find it again to get the right one.

And since we've held i_mutex lock, inode size remains unchanged and
we can drop isize overflow checks.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c