linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: Release semaphore before returning in lock_mount().
@ 2012-06-24  9:18 santosh nayak
  2012-06-24  9:37 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: santosh nayak @ 2012-06-24  9:18 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, kernel-janitors, Santosh Nayak

From: Santosh Nayak <santoshprasadnayak@gmail.com>

There is a missing "up_write()" here. Semaphore should be released
before returning.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
Destination tree "linux-next"

 fs/namespace.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 8f412ab..d5173df 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1473,8 +1473,10 @@ retry:
 	}
 	down_write(&namespace_sem);
 	mnt = lookup_mnt(path);
-	if (likely(!mnt))
+	if (likely(!mnt)) {
+		up_write(&namespace_sem);
 		return 0;
+	}
 	up_write(&namespace_sem);
 	mutex_unlock(&path->dentry->d_inode->i_mutex);
 	path_put(path);
-- 
1.7.4.4


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

end of thread, other threads:[~2012-06-24  9:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-24  9:18 [PATCH] vfs: Release semaphore before returning in lock_mount() santosh nayak
2012-06-24  9:37 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).