* [PATCH] btrfs: only unlock block in verify_parent_transid if we locked it
@ 2014-06-25 20:45 Josef Bacik
2014-07-03 9:24 ` Liu Bo
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2014-06-25 20:45 UTC (permalink / raw)
To: linux-btrfs; +Cc: Josef Bacik, stable
This is a regression from my patch a26e8c9f75b0bfd8cccc9e8f110737b136eb5994, we
need to only unlock the block if we were the one who locked it. Otherwise this
will trip BUG_ON()'s in locking.c Thanks,
cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fb.com>
---
fs/btrfs/disk-io.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8bb4aa1..f00165d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -369,7 +369,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
out:
unlock_extent_cached(io_tree, eb->start, eb->start + eb->len - 1,
&cached_state, GFP_NOFS);
- btrfs_tree_read_unlock_blocking(eb);
+ if (need_lock)
+ btrfs_tree_read_unlock_blocking(eb);
return ret;
}
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: only unlock block in verify_parent_transid if we locked it
2014-06-25 20:45 [PATCH] btrfs: only unlock block in verify_parent_transid if we locked it Josef Bacik
@ 2014-07-03 9:24 ` Liu Bo
0 siblings, 0 replies; 2+ messages in thread
From: Liu Bo @ 2014-07-03 9:24 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs, stable
On Wed, Jun 25, 2014 at 01:45:41PM -0700, Josef Bacik wrote:
> This is a regression from my patch a26e8c9f75b0bfd8cccc9e8f110737b136eb5994, we
> need to only unlock the block if we were the one who locked it. Otherwise this
> will trip BUG_ON()'s in locking.c Thanks,
>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
-liubo
> cc: stable@vger.kernel.org
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
> fs/btrfs/disk-io.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 8bb4aa1..f00165d 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -369,7 +369,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
> out:
> unlock_extent_cached(io_tree, eb->start, eb->start + eb->len - 1,
> &cached_state, GFP_NOFS);
> - btrfs_tree_read_unlock_blocking(eb);
> + if (need_lock)
> + btrfs_tree_read_unlock_blocking(eb);
> return ret;
> }
>
> --
> 2.0.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-03 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 20:45 [PATCH] btrfs: only unlock block in verify_parent_transid if we locked it Josef Bacik
2014-07-03 9:24 ` Liu Bo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).