eCryptFS: fix imbalanced mutex locking

Fix imbalanced calls for mutex lock/unlock on ecryptfs_daemon_hash_mux
Revealed by Ingo Molnar: http://lkml.org/lkml/2008/5/7/260

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Cyrill Gorcunov and committed by Linus Torvalds 43f14d85 d850a2fa

+2
+2
fs/ecryptfs/miscdev.c
··· 257 257 mutex_lock(&daemon->mux); 258 258 if (daemon->flags & ECRYPTFS_DAEMON_ZOMBIE) { 259 259 rc = 0; 260 + mutex_unlock(&ecryptfs_daemon_hash_mux); 260 261 printk(KERN_WARNING "%s: Attempt to read from zombified " 261 262 "daemon\n", __func__); 262 263 goto out_unlock_daemon; 263 264 } 264 265 if (daemon->flags & ECRYPTFS_DAEMON_IN_READ) { 265 266 rc = 0; 267 + mutex_unlock(&ecryptfs_daemon_hash_mux); 266 268 goto out_unlock_daemon; 267 269 } 268 270 /* This daemon will not go away so long as this flag is set */