mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00: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 <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6044ec8882
commit
f99d49adf5
39 changed files with 137 additions and 245 deletions
|
@ -75,7 +75,7 @@ void hpfs_error(struct super_block *s, char *m,...)
|
|||
} else if (s->s_flags & MS_RDONLY) printk("; going on - but anything won't be destroyed because it's read-only\n");
|
||||
else printk("; corrupted filesystem mounted read/write - your computer will explode within 20 seconds ... but you wanted it so!\n");
|
||||
} else printk("\n");
|
||||
if (buf) kfree(buf);
|
||||
kfree(buf);
|
||||
hpfs_sb(s)->sb_was_error = 1;
|
||||
}
|
||||
|
||||
|
@ -102,8 +102,8 @@ int hpfs_stop_cycles(struct super_block *s, int key, int *c1, int *c2,
|
|||
static void hpfs_put_super(struct super_block *s)
|
||||
{
|
||||
struct hpfs_sb_info *sbi = hpfs_sb(s);
|
||||
if (sbi->sb_cp_table) kfree(sbi->sb_cp_table);
|
||||
if (sbi->sb_bmp_dir) kfree(sbi->sb_bmp_dir);
|
||||
kfree(sbi->sb_cp_table);
|
||||
kfree(sbi->sb_bmp_dir);
|
||||
unmark_dirty(s);
|
||||
s->s_fs_info = NULL;
|
||||
kfree(sbi);
|
||||
|
@ -654,8 +654,8 @@ bail3: brelse(bh1);
|
|||
bail2: brelse(bh0);
|
||||
bail1:
|
||||
bail0:
|
||||
if (sbi->sb_bmp_dir) kfree(sbi->sb_bmp_dir);
|
||||
if (sbi->sb_cp_table) kfree(sbi->sb_cp_table);
|
||||
kfree(sbi->sb_bmp_dir);
|
||||
kfree(sbi->sb_cp_table);
|
||||
s->s_fs_info = NULL;
|
||||
kfree(sbi);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue