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

2015-03-18 Thread Liu Bo
On Tue, Feb 24, 2015 at 02:47:05AM -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

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

2015-03-13 Thread David Sterba
On Tue, Feb 24, 2015 at 02:47:05AM -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 v2 2/3] btrfs: fix race on ENOMEM in alloc_extent_buffer

2015-02-24 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