nfsd4: Fix filp leak
[pandora-kernel.git] / fs / ecryptfs / main.c
index 520d05f..fdb2eb0 100644 (file)
@@ -254,8 +254,10 @@ static int ecryptfs_init_global_auth_toks(
                               "option: [%s]\n", global_auth_tok->sig);
                        global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID;
                        goto out;
-               } else
+               } else {
                        global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID;
+                       up_write(&(global_auth_tok->global_auth_tok_key)->sem);
+               }
        }
 out:
        return rc;
@@ -274,7 +276,7 @@ static void ecryptfs_init_mount_crypt_stat(
 /**
  * ecryptfs_parse_options
  * @sb: The ecryptfs super block
- * @options: The options pased to the kernel
+ * @options: The options passed to the kernel
  *
  * Parse mount options:
  * debug=N        - ecryptfs_verbosity level for debug output
@@ -838,7 +840,7 @@ static int __init ecryptfs_init(void)
        }
        rc = ecryptfs_init_messaging();
        if (rc) {
-               printk(KERN_ERR "Failure occured while attempting to "
+               printk(KERN_ERR "Failure occurred while attempting to "
                                "initialize the communications channel to "
                                "ecryptfsd\n");
                goto out_destroy_kthread;