]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix wrong return value of btrfs_truncate_page()
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 5 Dec 2012 10:56:13 +0000 (10:56 +0000)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:20 +0000 (20:46 -0500)
commiteb90116c5897f31a06b3ea7f12b401b3c12d7325
tree7e6212618664d645a5954ddcd8de58267e0f916c
parent44df04ba773d87298ec91ce61c801a42270ce317
Btrfs: fix wrong return value of btrfs_truncate_page()

ret variant may be set to 0 if we read page successfully, but it might be
released before we lock it again. On this case, if we fail to allocate a
new page, we will return 0, it is wrong, fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/inode.c