Linux-BTRFS Archive on
 help / Atom feed
* [PATCH] btrfs: drop the lock on error in btrfs_dev_replace_cancel()
@ 2019-02-11 18:32 Dan Carpenter
  0 siblings, 0 replies; 1+ messages in thread
From: Dan Carpenter @ 2019-02-11 18:32 UTC (permalink / raw)
  To: Chris Mason, Anand Jain
  Cc: Josef Bacik, David Sterba, linux-btrfs, kernel-janitors

We should drop the lock on this error path.  This is from static
analysis and I don't know if it's possible to hit this error path in
real life.

Signed-off-by: Dan Carpenter <>
 fs/btrfs/dev-replace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 13863354ff9d..ee193c5222b2 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -862,6 +862,7 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
+		up_write(&dev_replace->rwsem);
 		result = -EINVAL;

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 18:32 [PATCH] btrfs: drop the lock on error in btrfs_dev_replace_cancel() Dan Carpenter

Linux-BTRFS Archive on

Archives are clonable:
	git clone --mirror linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ \
	public-inbox-index linux-btrfs

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox