diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:06 -0500 |
commit | f99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch) | |
tree | 41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/jffs2/readinode.c | |
parent | 6044ec8882c726e325017bd948aa0cd94ad33abc (diff) |
[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>
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r-- | fs/jffs2/readinode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 5b2a83599d73..1a96903e3ef3 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
@@ -490,7 +490,7 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i | |||
490 | up(&f->sem); | 490 | up(&f->sem); |
491 | jffs2_do_clear_inode(c, f); | 491 | jffs2_do_clear_inode(c, f); |
492 | } | 492 | } |
493 | kfree (f); | 493 | kfree(f); |
494 | return ret; | 494 | return ret; |
495 | } | 495 | } |
496 | 496 | ||
@@ -742,10 +742,8 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f) | |||
742 | 742 | ||
743 | /* For symlink inodes we us f->dents to store the target path name */ | 743 | /* For symlink inodes we us f->dents to store the target path name */ |
744 | if (S_ISLNK(OFNI_EDONI_2SFFJ(f)->i_mode)) { | 744 | if (S_ISLNK(OFNI_EDONI_2SFFJ(f)->i_mode)) { |
745 | if (f->dents) { | 745 | kfree(f->dents); |
746 | kfree(f->dents); | 746 | f->dents = NULL; |
747 | f->dents = NULL; | ||
748 | } | ||
749 | } else { | 747 | } else { |
750 | fds = f->dents; | 748 | fds = f->dents; |
751 | 749 | ||