From: Dan Carpenter <dan.carpenter@oracle.com> To: Chris Mason <clm@fb.com>, Anand Jain <anand.jain@oracle.com> Cc: Josef Bacik <josef@toxicpanda.com>, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] btrfs: drop the lock on error in btrfs_dev_replace_cancel() Date: Mon, 11 Feb 2019 21:32:10 +0300 [thread overview] Message-ID: <20190211183209.GA13934@kadam> (raw) 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 <dan.carpenter@oracle.com> --- 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) btrfs_destroy_dev_replace_tgtdev(tgt_device); break; default: + up_write(&dev_replace->rwsem); result = -EINVAL; } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Chris Mason <clm@fb.com>, Anand Jain <anand.jain@oracle.com> Cc: Josef Bacik <josef@toxicpanda.com>, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] btrfs: drop the lock on error in btrfs_dev_replace_cancel() Date: Mon, 11 Feb 2019 18:32:10 +0000 [thread overview] Message-ID: <20190211183209.GA13934@kadam> (raw) 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 <dan.carpenter@oracle.com> --- 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) btrfs_destroy_dev_replace_tgtdev(tgt_device); break; default: + up_write(&dev_replace->rwsem); result = -EINVAL; } -- 2.17.1
next reply other threads:[~2019-02-11 18:32 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-11 18:32 Dan Carpenter [this message] 2019-02-11 18:32 ` [PATCH] btrfs: drop the lock on error in btrfs_dev_replace_cancel() Dan Carpenter 2019-02-19 19:04 ` David Sterba 2019-02-19 19:04 ` David Sterba 2019-02-20 1:20 ` Anand Jain 2019-02-20 1:20 ` Anand Jain
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190211183209.GA13934@kadam \ --to=dan.carpenter@oracle.com \ --cc=anand.jain@oracle.com \ --cc=clm@fb.com \ --cc=dsterba@suse.com \ --cc=josef@toxicpanda.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-btrfs@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.