[PATCH 4/4] hypfs: free sb->s_fs_info after shutting down the super block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


sb->s_fs_info can only be safely freed after generic_shutdown_super was
called and all access to the super_block has stopped.

Thus only free the private data after calling kill_litter_super, which
calls generic_shutdown_super internally.

Also remove the pointless clearing of sb->s_fs_info as the super_block
can't be accessed at this point and will be freed immediately.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
 arch/s390/hypfs/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index ada83149932fec..dbe8a7dcafa922 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -329,9 +329,8 @@ static void hypfs_kill_super(struct super_block *sb)
 	if (sb_info && sb_info->update_file)
-	kfree(sb->s_fs_info);
-	sb->s_fs_info = NULL;
+	kfree(sb->s_fs_info);
 static struct dentry *hypfs_create_file(struct dentry *parent, const char *name,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux