[patch 03/11] befs: cleanup befs_put_super()

From: Thomas Gleixner
Date: Fri Aug 14 2009 - 08:43:06 EST


unload_nls() can be called with a NULL pointer now. Remove the pointer
checks and the NULLification of the pointer as the data structure
which contains the pointer is kfree'd right away.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
fs/befs/linuxvfs.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Index: linux-2.6-tip/fs/befs/linuxvfs.c
===================================================================
--- linux-2.6-tip.orig/fs/befs/linuxvfs.c
+++ linux-2.6-tip/fs/befs/linuxvfs.c
@@ -737,12 +737,7 @@ befs_put_super(struct super_block *sb)
{
kfree(BEFS_SB(sb)->mount_opts.iocharset);
BEFS_SB(sb)->mount_opts.iocharset = NULL;
-
- if (BEFS_SB(sb)->nls) {
- unload_nls(BEFS_SB(sb)->nls);
- BEFS_SB(sb)->nls = NULL;
- }
-
+ unload_nls(BEFS_SB(sb)->nls);
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/