Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63852
b: refs/heads/master
c: a75de1b
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi authored and Linus Torvalds committed Aug 11, 2007
1 parent fe81fd0 commit 00cba97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9a0620779d3714abd63dfc28284f5fa2c1fc091
refs/heads/master: a75de1b3799f8933d6d2b64bdf31194368ec98ab
18 changes: 13 additions & 5 deletions trunk/fs/ecryptfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,15 @@ static int do_sysfs_registration(void)
return rc;
}

static void do_sysfs_unregistration(void)
{
sysfs_remove_file(&ecryptfs_subsys.kobj,
&sysfs_attr_version.attr);
sysfs_remove_file(&ecryptfs_subsys.kobj,
&sysfs_attr_version_str.attr);
subsystem_unregister(&ecryptfs_subsys);
}

static int __init ecryptfs_init(void)
{
int rc;
Expand Down Expand Up @@ -851,18 +860,17 @@ static int __init ecryptfs_init(void)
if (rc) {
ecryptfs_printk(KERN_ERR, "Failure occured while attempting to "
"initialize the eCryptfs netlink socket\n");
do_sysfs_unregistration();
unregister_filesystem(&ecryptfs_fs_type);
ecryptfs_free_kmem_caches();
}
out:
return rc;
}

static void __exit ecryptfs_exit(void)
{
sysfs_remove_file(&ecryptfs_subsys.kobj,
&sysfs_attr_version.attr);
sysfs_remove_file(&ecryptfs_subsys.kobj,
&sysfs_attr_version_str.attr);
subsystem_unregister(&ecryptfs_subsys);
do_sysfs_unregistration();
ecryptfs_release_messaging(ecryptfs_transport);
unregister_filesystem(&ecryptfs_fs_type);
ecryptfs_free_kmem_caches();
Expand Down

0 comments on commit 00cba97

Please sign in to comment.