mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6044ec8882
commit
f99d49adf5
39 changed files with 137 additions and 245 deletions
|
|
@ -35,8 +35,7 @@ affs_put_super(struct super_block *sb)
|
|||
mark_buffer_dirty(sbi->s_root_bh);
|
||||
}
|
||||
|
||||
if (sbi->s_prefix)
|
||||
kfree(sbi->s_prefix);
|
||||
kfree(sbi->s_prefix);
|
||||
affs_free_bitmap(sb);
|
||||
affs_brelse(sbi->s_root_bh);
|
||||
kfree(sbi);
|
||||
|
|
@ -198,10 +197,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
|
|||
*mount_opts |= SF_MUFS;
|
||||
break;
|
||||
case Opt_prefix:
|
||||
if (*prefix) { /* Free any previous prefix */
|
||||
kfree(*prefix);
|
||||
*prefix = NULL;
|
||||
}
|
||||
/* Free any previous prefix */
|
||||
kfree(*prefix);
|
||||
*prefix = NULL;
|
||||
*prefix = match_strdup(&args[0]);
|
||||
if (!*prefix)
|
||||
return 0;
|
||||
|
|
@ -462,11 +460,9 @@ got_root:
|
|||
out_error:
|
||||
if (root_inode)
|
||||
iput(root_inode);
|
||||
if (sbi->s_bitmap)
|
||||
kfree(sbi->s_bitmap);
|
||||
kfree(sbi->s_bitmap);
|
||||
affs_brelse(root_bh);
|
||||
if (sbi->s_prefix)
|
||||
kfree(sbi->s_prefix);
|
||||
kfree(sbi->s_prefix);
|
||||
kfree(sbi);
|
||||
sb->s_fs_info = NULL;
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue