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)
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>

No differences found