Re: [PATCH 2/3] btrfs: handle race on ENOMEM in alloc_extent_buffer

2015-02-17 Thread Omar Sandoval
On Tue, Feb 17, 2015 at 02:51:08AM -0800, Omar Sandoval wrote: > Consider the following interleaving of overlapping calls to > alloc_extent_buffer: > > Call 1: > > - Successfully allocates a few pages with find_or_create_page > - find_or_create_page fails, goto free_eb > - Unlocks the allocated p

[PATCH 2/3] btrfs: handle race on ENOMEM in alloc_extent_buffer

2015-02-17 Thread Omar Sandoval
Consider the following interleaving of overlapping calls to alloc_extent_buffer: Call 1: - Successfully allocates a few pages with find_or_create_page - find_or_create_page fails, goto free_eb - Unlocks the allocated pages Call 2: - Calls find_or_create_page and gets a page in call 1's extent_bu