From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthew Wilcox <matthew@wil.cx>, "J. Bruce Fields" <bfields@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch v2] locks: missing unlock on error in generic_add_lease()
Date: Wed, 13 Nov 2013 14:10:31 +0000 [thread overview]
Message-ID: <20131113141031.GA29645@elgon.mountain> (raw)
In-Reply-To: <20131113135103.GA27536@pad.fieldses.org>
We should unlock here before returning.
Fixes: df4e8d2c1d2b ('locks: implement delegations')
Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: Style fix
diff --git a/fs/locks.c b/fs/locks.c
index f99d52b..7b7ed7d 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1495,7 +1495,8 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp
if (is_deleg && arg = F_WRLCK) {
/* Write delegations are not currently supported: */
WARN_ON_ONCE(1);
- return -EINVAL;
+ error = -EINVAL;
+ goto out;
}
error = -EAGAIN;
prev parent reply other threads:[~2013-11-13 14:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 7:56 [patch] locks: missing unlock on error in generic_add_lease() Dan Carpenter
2013-11-13 13:51 ` J. Bruce Fields
2013-11-13 14:07 ` Dan Carpenter
2013-11-13 14:10 ` Dan Carpenter [this message]
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=20131113141031.GA29645@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=bfields@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=viro@zeniv.linux.org.uk \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox