aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:06 -0500
commitf99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch)
tree41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/hpfs
parent6044ec8882c726e325017bd948aa0cd94ad33abc (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/hpfs')
-rw-r--r--fs/hpfs/dnode.c8
-rw-r--r--fs/hpfs/super.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 1d21307730a8..229ff2fb1809 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -244,12 +244,12 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
244 go_up: 244 go_up:
245 if (namelen >= 256) { 245 if (namelen >= 256) {
246 hpfs_error(i->i_sb, "hpfs_add_to_dnode: namelen == %d", namelen); 246 hpfs_error(i->i_sb, "hpfs_add_to_dnode: namelen == %d", namelen);
247 if (nd) kfree(nd); 247 kfree(nd);
248 kfree(nname); 248 kfree(nname);
249 return 1; 249 return 1;
250 } 250 }
251 if (!(d = hpfs_map_dnode(i->i_sb, dno, &qbh))) { 251 if (!(d = hpfs_map_dnode(i->i_sb, dno, &qbh))) {
252 if (nd) kfree(nd); 252 kfree(nd);
253 kfree(nname); 253 kfree(nname);
254 return 1; 254 return 1;
255 } 255 }
@@ -257,7 +257,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
257 if (hpfs_sb(i->i_sb)->sb_chk) 257 if (hpfs_sb(i->i_sb)->sb_chk)
258 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "hpfs_add_to_dnode")) { 258 if (hpfs_stop_cycles(i->i_sb, dno, &c1, &c2, "hpfs_add_to_dnode")) {
259 hpfs_brelse4(&qbh); 259 hpfs_brelse4(&qbh);
260 if (nd) kfree(nd); 260 kfree(nd);
261 kfree(nname); 261 kfree(nname);
262 return 1; 262 return 1;
263 } 263 }
@@ -270,7 +270,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
270 for_all_poss(i, hpfs_pos_subst, 5, t + 1); 270 for_all_poss(i, hpfs_pos_subst, 5, t + 1);
271 hpfs_mark_4buffers_dirty(&qbh); 271 hpfs_mark_4buffers_dirty(&qbh);
272 hpfs_brelse4(&qbh); 272 hpfs_brelse4(&qbh);
273 if (nd) kfree(nd); 273 kfree(nd);
274 kfree(nname); 274 kfree(nname);
275 return 0; 275 return 0;
276 } 276 }
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 8eefa6366db7..63e88d7e2c3b 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -75,7 +75,7 @@ void hpfs_error(struct super_block *s, char *m,...)
75 } else if (s->s_flags & MS_RDONLY) printk("; going on - but anything won't be destroyed because it's read-only\n"); 75 } else if (s->s_flags & MS_RDONLY) printk("; going on - but anything won't be destroyed because it's read-only\n");
76 else printk("; corrupted filesystem mounted read/write - your computer will explode within 20 seconds ... but you wanted it so!\n"); 76 else printk("; corrupted filesystem mounted read/write - your computer will explode within 20 seconds ... but you wanted it so!\n");
77 } else printk("\n"); 77 } else printk("\n");
78 if (buf) kfree(buf); 78 kfree(buf);
79 hpfs_sb(s)->sb_was_error = 1; 79 hpfs_sb(s)->sb_was_error = 1;
80} 80}
81 81
@@ -102,8 +102,8 @@ int hpfs_stop_cycles(struct super_block *s, int key, int *c1, int *c2,
102static void hpfs_put_super(struct super_block *s) 102static void hpfs_put_super(struct super_block *s)
103{ 103{
104 struct hpfs_sb_info *sbi = hpfs_sb(s); 104 struct hpfs_sb_info *sbi = hpfs_sb(s);
105 if (sbi->sb_cp_table) kfree(sbi->sb_cp_table); 105 kfree(sbi->sb_cp_table);
106 if (sbi->sb_bmp_dir) kfree(sbi->sb_bmp_dir); 106 kfree(sbi->sb_bmp_dir);
107 unmark_dirty(s); 107 unmark_dirty(s);
108 s->s_fs_info = NULL; 108 s->s_fs_info = NULL;
109 kfree(sbi); 109 kfree(sbi);
@@ -654,8 +654,8 @@ bail3: brelse(bh1);
654bail2: brelse(bh0); 654bail2: brelse(bh0);
655bail1: 655bail1:
656bail0: 656bail0:
657 if (sbi->sb_bmp_dir) kfree(sbi->sb_bmp_dir); 657 kfree(sbi->sb_bmp_dir);
658 if (sbi->sb_cp_table) kfree(sbi->sb_cp_table); 658 kfree(sbi->sb_cp_table);
659 s->s_fs_info = NULL; 659 s->s_fs_info = NULL;
660 kfree(sbi); 660 kfree(sbi);
661 return -EINVAL; 661 return -EINVAL;