]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: handle no memory properly in prepare_pages
authorJosef Bacik <josef@redhat.com>
Tue, 25 Jan 2011 22:11:54 +0000 (22:11 +0000)
committerChris Mason <chris.mason@oracle.com>
Fri, 28 Jan 2011 21:42:34 +0000 (16:42 -0500)
commitda1d900ae197a8ddc53f403a382b445d04c06333
tree5723e9679a7926ea744c242cc8351e64ce7503e4
parent0ed023f48d6ea28a657d08719703ad235bf52e74
Btrfs: handle no memory properly in prepare_pages

Instead of doing a BUG_ON(1) in prepare_pages if grab_cache_page() fails, just
loop through the pages we've already grabbed and unlock and release them, then
return -ENOMEM like we should.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/file.c