All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
@ 2019-07-08 12:01 Stanislaw Gruszka
  2019-07-08 13:51 ` Nikolay Borisov
  2019-07-08 14:00 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2019-07-08 12:01 UTC (permalink / raw)
  To: stable; +Cc: linux-btrfs

Upstream commit 38e3eebff643 ("btrfs: honor path->skip_locking in
backref code") was incorrectly backported to 4.14.y . It misses removal
of two lines from original commit, what cause deadlock.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203993
Reported-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
Fixes: d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
I did not test the patch, not even compile, but backport looks
obviously wrong compared to original commit.

 fs/btrfs/backref.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index d826fbaf7d50..e4d5e6eae409 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1290,8 +1290,6 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
 					ret = -EIO;
 					goto out;
 				}
-				btrfs_tree_read_lock(eb);
-				btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
 				if (!path->skip_locking) {
 					btrfs_tree_read_lock(eb);
 					btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
  2019-07-08 12:01 [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code") Stanislaw Gruszka
@ 2019-07-08 13:51 ` Nikolay Borisov
  2019-07-08 14:00 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2019-07-08 13:51 UTC (permalink / raw)
  To: Stanislaw Gruszka, stable; +Cc: linux-btrfs



On 8.07.19 г. 15:01 ч., Stanislaw Gruszka wrote:
> Upstream commit 38e3eebff643 ("btrfs: honor path->skip_locking in
> backref code") was incorrectly backported to 4.14.y . It misses removal
> of two lines from original commit, what cause deadlock.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203993
> Reported-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
> Fixes: d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> I did not test the patch, not even compile, but backport looks
> obviously wrong compared to original commit.

I concur, it's indeed wrongly backported so:

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> 
>  fs/btrfs/backref.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
> index d826fbaf7d50..e4d5e6eae409 100644
> --- a/fs/btrfs/backref.c
> +++ b/fs/btrfs/backref.c
> @@ -1290,8 +1290,6 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
>  					ret = -EIO;
>  					goto out;
>  				}
> -				btrfs_tree_read_lock(eb);
> -				btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
>  				if (!path->skip_locking) {
>  					btrfs_tree_read_lock(eb);
>  					btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
  2019-07-08 12:01 [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code") Stanislaw Gruszka
  2019-07-08 13:51 ` Nikolay Borisov
@ 2019-07-08 14:00 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-07-08 14:00 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: stable, linux-btrfs

On Mon, Jul 08, 2019 at 02:01:34PM +0200, Stanislaw Gruszka wrote:
> Upstream commit 38e3eebff643 ("btrfs: honor path->skip_locking in
> backref code") was incorrectly backported to 4.14.y . It misses removal
> of two lines from original commit, what cause deadlock.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203993
> Reported-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
> Fixes: d819d97ea025 ("btrfs: honor path->skip_locking in backref code")
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> I did not test the patch, not even compile, but backport looks
> obviously wrong compared to original commit.

Thanks for catching this!

now queued up,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-08 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 12:01 [PATCH 4.14.y] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code") Stanislaw Gruszka
2019-07-08 13:51 ` Nikolay Borisov
2019-07-08 14:00 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.