From: Dan Carpenter <dan.carpenter@oracle.com>
To: Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [patch] CIFS: double unlock in cifs_lock_add_if()
Date: Sat, 29 Oct 2011 07:18:54 +0000 [thread overview]
Message-ID: <20111029071854.GA17780@elgon.mountain> (raw)
We unlocked "cinode->lock_mutex" twice so I've removed the first
unlock.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ea096ce..b8dbab8 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -775,11 +775,9 @@ try_again:
(lock->blist.next = &lock->blist));
if (!rc)
goto try_again;
- else {
- mutex_lock(&cinode->lock_mutex);
- list_del_init(&lock->blist);
- mutex_unlock(&cinode->lock_mutex);
- }
+
+ mutex_lock(&cinode->lock_mutex);
+ list_del_init(&lock->blist);
}
kfree(lock);
next reply other threads:[~2011-10-29 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 7:18 Dan Carpenter [this message]
[not found] ` <20111029071854.GA17780-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2011-10-29 7:25 ` [patch] CIFS: double unlock in cifs_lock_add_if() Pavel Shilovsky
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=20111029071854.GA17780@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.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: 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