Re: [PATCH 4.19 19/71] btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()

2020-11-12 Thread Sasha Levin
On Wed, Nov 11, 2020 at 02:39:34PM +, Ben Hutchings wrote: On Wed, 2020-11-11 at 13:44 +0100, Pavel Machek wrote: Hi! > Thankfully it's handled by the only caller, btree_write_cache_pages(), > as later write_one_eb() call will trigger submit_one_bio(). So there > shouldn't be any problem.

Re: [PATCH 4.19 19/71] btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()

2020-11-11 Thread Ben Hutchings
On Wed, 2020-11-11 at 13:44 +0100, Pavel Machek wrote: > Hi! > > > Thankfully it's handled by the only caller, btree_write_cache_pages(), > > as later write_one_eb() call will trigger submit_one_bio(). So there > > shouldn't be any problem. > > This explains there should not be any problem in

Re: [PATCH 4.19 19/71] btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()

2020-11-11 Thread Pavel Machek
Hi! > Thankfully it's handled by the only caller, btree_write_cache_pages(), > as later write_one_eb() call will trigger submit_one_bio(). So there > shouldn't be any problem. This explains there should not be any problem in _the mainline_. AFAICT this talks about this code. Mainline version

[PATCH 4.19 19/71] btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()

2020-11-09 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 2e3c25136adfb293d517e17f761d3b8a43a8fc22 upstream. This function needs some extra checks on locked pages and eb. For error handling we need to unlock locked pages and the eb. There is a rare >0 return value branch, where all pages get locked while write bio is not