From db8153e43a257529cbb9934ad779844c137e0369 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 20 Mar 2010 22:32:26 -0400 Subject: [PATCH] --- yaml --- r: 197934 b: refs/heads/master c: decabd6650915a9534dad09e967115513be12b24 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ecryptfs/main.c | 9 +++++++-- trunk/fs/ecryptfs/super.c | 22 ---------------------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index 2b2e867c2766..4999b482ed28 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 894680710d813137077ad7cb351b713f64cabbdf +refs/heads/master: decabd6650915a9534dad09e967115513be12b24 diff --git a/trunk/fs/ecryptfs/main.c b/trunk/fs/ecryptfs/main.c index 760983d0f25e..36268db29ea1 100644 --- a/trunk/fs/ecryptfs/main.c +++ b/trunk/fs/ecryptfs/main.c @@ -633,11 +633,16 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags, * @sb: The ecryptfs super block * * Used to bring the superblock down and free the private data. - * Private data is free'd in ecryptfs_put_super() */ static void ecryptfs_kill_block_super(struct super_block *sb) { - generic_shutdown_super(sb); + struct ecryptfs_sb_info *sb_info = ecryptfs_superblock_to_private(sb); + kill_anon_super(sb); + if (!sb_info) + return; + ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat); + bdi_destroy(&sb_info->bdi); + kmem_cache_free(ecryptfs_sb_info_cache, sb_info); } static struct file_system_type ecryptfs_fs_type = { diff --git a/trunk/fs/ecryptfs/super.c b/trunk/fs/ecryptfs/super.c index 0c0ae491d231..0435886e4a9f 100644 --- a/trunk/fs/ecryptfs/super.c +++ b/trunk/fs/ecryptfs/super.c @@ -108,27 +108,6 @@ void ecryptfs_init_inode(struct inode *inode, struct inode *lower_inode) inode->i_mapping->a_ops = &ecryptfs_aops; } -/** - * ecryptfs_put_super - * @sb: Pointer to the ecryptfs super block - * - * Final actions when unmounting a file system. - * This will handle deallocation and release of our private data. - */ -static void ecryptfs_put_super(struct super_block *sb) -{ - struct ecryptfs_sb_info *sb_info = ecryptfs_superblock_to_private(sb); - - lock_kernel(); - - ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat); - bdi_destroy(&sb_info->bdi); - kmem_cache_free(ecryptfs_sb_info_cache, sb_info); - ecryptfs_set_superblock_private(sb, NULL); - - unlock_kernel(); -} - /** * ecryptfs_statfs * @sb: The ecryptfs super block @@ -203,7 +182,6 @@ const struct super_operations ecryptfs_sops = { .alloc_inode = ecryptfs_alloc_inode, .destroy_inode = ecryptfs_destroy_inode, .drop_inode = generic_delete_inode, - .put_super = ecryptfs_put_super, .statfs = ecryptfs_statfs, .remount_fs = NULL, .clear_inode = ecryptfs_clear_inode,