diff options
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/inode.c | 4 | ||||
-rw-r--r-- | fs/ecryptfs/main.c | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 0a50942b4378..131954b3fb98 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -353,6 +353,10 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
353 | ecryptfs_printk(KERN_DEBUG, "Is a symlink; returning\n"); | 353 | ecryptfs_printk(KERN_DEBUG, "Is a symlink; returning\n"); |
354 | goto out; | 354 | goto out; |
355 | } | 355 | } |
356 | if (special_file(lower_inode->i_mode)) { | ||
357 | ecryptfs_printk(KERN_DEBUG, "Is a special file; returning\n"); | ||
358 | goto out; | ||
359 | } | ||
356 | if (!nd) { | 360 | if (!nd) { |
357 | ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave" | 361 | ecryptfs_printk(KERN_DEBUG, "We have a NULL nd, just leave" |
358 | "as we *think* we are about to unlink\n"); | 362 | "as we *think* we are about to unlink\n"); |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index e557a6766927..a98497264fe8 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -813,6 +813,15 @@ out: | |||
813 | return rc; | 813 | return rc; |
814 | } | 814 | } |
815 | 815 | ||
816 | static void do_sysfs_unregistration(void) | ||
817 | { | ||
818 | sysfs_remove_file(&ecryptfs_subsys.kobj, | ||
819 | &sysfs_attr_version.attr); | ||
820 | sysfs_remove_file(&ecryptfs_subsys.kobj, | ||
821 | &sysfs_attr_version_str.attr); | ||
822 | subsystem_unregister(&ecryptfs_subsys); | ||
823 | } | ||
824 | |||
816 | static int __init ecryptfs_init(void) | 825 | static int __init ecryptfs_init(void) |
817 | { | 826 | { |
818 | int rc; | 827 | int rc; |
@@ -851,6 +860,9 @@ static int __init ecryptfs_init(void) | |||
851 | if (rc) { | 860 | if (rc) { |
852 | ecryptfs_printk(KERN_ERR, "Failure occured while attempting to " | 861 | ecryptfs_printk(KERN_ERR, "Failure occured while attempting to " |
853 | "initialize the eCryptfs netlink socket\n"); | 862 | "initialize the eCryptfs netlink socket\n"); |
863 | do_sysfs_unregistration(); | ||
864 | unregister_filesystem(&ecryptfs_fs_type); | ||
865 | ecryptfs_free_kmem_caches(); | ||
854 | } | 866 | } |
855 | out: | 867 | out: |
856 | return rc; | 868 | return rc; |
@@ -858,11 +870,7 @@ out: | |||
858 | 870 | ||
859 | static void __exit ecryptfs_exit(void) | 871 | static void __exit ecryptfs_exit(void) |
860 | { | 872 | { |
861 | sysfs_remove_file(&ecryptfs_subsys.kobj, | 873 | do_sysfs_unregistration(); |
862 | &sysfs_attr_version.attr); | ||
863 | sysfs_remove_file(&ecryptfs_subsys.kobj, | ||
864 | &sysfs_attr_version_str.attr); | ||
865 | subsystem_unregister(&ecryptfs_subsys); | ||
866 | ecryptfs_release_messaging(ecryptfs_transport); | 874 | ecryptfs_release_messaging(ecryptfs_transport); |
867 | unregister_filesystem(&ecryptfs_fs_type); | 875 | unregister_filesystem(&ecryptfs_fs_type); |
868 | ecryptfs_free_kmem_caches(); | 876 | ecryptfs_free_kmem_caches(); |