[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:
committed by
Linus Torvalds
parent
6044ec8882
commit
f99d49adf5
@ -244,12 +244,12 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
|
||||
go_up:
|
||||
if (namelen >= 256) {
|
||||
hpfs_error(i->i_sb, "hpfs_add_to_dnode: namelen == %d", namelen);
|
||||
if (nd) kfree(nd);
|
||||
kfree(nd);
|
||||
kfree(nname);
|
||||
return 1;
|
||||
}
|
||||
if (!(d = hpfs_map_dnode(i->i_sb, dno, &qbh))) {
|
||||
if (nd) kfree(nd);
|
||||
kfree(nd);
|
||||
kfree(nname);
|
||||
return 1;
|
||||
}
|
||||
@ -257,7 +257,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
|
||||
if (hpfs_sb(i->i_sb)->sb_chk)
|
||||
if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "hpfs_add_to_dnode")) {
|
||||
hpfs_brelse4(&qbh);
|
||||
if (nd) kfree(nd);
|
||||
kfree(nd);
|
||||
kfree(nname);
|
||||
return 1;
|
||||
}
|
||||
@ -270,7 +270,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
|
||||
for_all_poss(i, hpfs_pos_subst, 5, t + 1);
|
||||
hpfs_mark_4buffers_dirty(&qbh);
|
||||
hpfs_brelse4(&qbh);
|
||||
if (nd) kfree(nd);
|
||||
kfree(nd);
|
||||
kfree(nname);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user