From 89be31ad43f2840dd1c47a055fcb8a5f119a9dd7 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 17 Mar 2012 21:29:13 -0400 Subject: [PATCH] --- yaml --- r: 292369 b: refs/heads/master c: 0794f569ec307dc25bbb12456ef75aa71f72f744 h: refs/heads/master i: 292367: e734a003f75c5ee466f5fbded1e098ac57a5f3b4 v: v3 --- [refs] | 2 +- trunk/fs/ecryptfs/main.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 525376543511..c1fcd876681d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4c5499d2cbe54f0470764acfd0faf4e965aa7e9 +refs/heads/master: 0794f569ec307dc25bbb12456ef75aa71f72f744 diff --git a/trunk/fs/ecryptfs/main.c b/trunk/fs/ecryptfs/main.c index 6e0e017e6932..68954937a071 100644 --- a/trunk/fs/ecryptfs/main.c +++ b/trunk/fs/ecryptfs/main.c @@ -794,15 +794,10 @@ static int __init ecryptfs_init(void) "Failed to allocate one or more kmem_cache objects\n"); goto out; } - rc = register_filesystem(&ecryptfs_fs_type); - if (rc) { - printk(KERN_ERR "Failed to register filesystem\n"); - goto out_free_kmem_caches; - } rc = do_sysfs_registration(); if (rc) { printk(KERN_ERR "sysfs registration failed\n"); - goto out_unregister_filesystem; + goto out_free_kmem_caches; } rc = ecryptfs_init_kthread(); if (rc) { @@ -823,19 +818,24 @@ static int __init ecryptfs_init(void) "rc = [%d]\n", rc); goto out_release_messaging; } + rc = register_filesystem(&ecryptfs_fs_type); + if (rc) { + printk(KERN_ERR "Failed to register filesystem\n"); + goto out_destroy_crypto; + } if (ecryptfs_verbosity > 0) printk(KERN_CRIT "eCryptfs verbosity set to %d. Secret values " "will be written to the syslog!\n", ecryptfs_verbosity); goto out; +out_destroy_crypto: + ecryptfs_destroy_crypto(); out_release_messaging: ecryptfs_release_messaging(); out_destroy_kthread: ecryptfs_destroy_kthread(); out_do_sysfs_unregistration: do_sysfs_unregistration(); -out_unregister_filesystem: - unregister_filesystem(&ecryptfs_fs_type); out_free_kmem_caches: ecryptfs_free_kmem_caches(); out: