public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] CIFS: double unlock in cifs_lock_add_if()
@ 2011-10-29  7:18 Dan Carpenter
       [not found] ` <20111029071854.GA17780-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-10-29  7:18 UTC (permalink / raw)
  To: Steve French, Pavel Shilovsky
  Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

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);

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

end of thread, other threads:[~2011-10-29  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29  7:18 [patch] CIFS: double unlock in cifs_lock_add_if() Dan Carpenter
     [not found] ` <20111029071854.GA17780-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2011-10-29  7:25   ` Pavel Shilovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox