]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure we retry if page is a retriable exception
authorFilipe Manana <fdmanana@gmail.com>
Thu, 5 Jun 2014 12:22:25 +0000 (13:22 +0100)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:21:13 +0000 (17:21 -0700)
commit56cc4ef0d61a85df64c2915b5497dff79f8c90c2
tree9de246dd948d1de525d70d290118a28bb64b4c9d
parent6db6a7063fa2c28b515fa42a511ad8d652c6cfdd
Btrfs: make sure we retry if page is a retriable exception

In inode.c:btrfs_page_exists_in_range(), if the page we get from the
radix tree is an exception which should make us retry, set page to
NULL in order to really retry, because otherwise we don't get another
loop iteration executed (page != NULL makes the while loop exit).
This also was making us call page_cache_release after exiting the loop,
which isn't correct because page doesn't point to a valid page, and
possibly return true from the function when we shouldn't.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/inode.c