aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
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/affs
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/affs')
-rw-r--r--fs/affs/super.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 9c3080716c92..aaec015a16e4 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -35,8 +35,7 @@ affs_put_super(struct super_block *sb)
35 mark_buffer_dirty(sbi->s_root_bh); 35 mark_buffer_dirty(sbi->s_root_bh);
36 } 36 }
37 37
38 if (sbi->s_prefix) 38 kfree(sbi->s_prefix);
39 kfree(sbi->s_prefix);
40 affs_free_bitmap(sb); 39 affs_free_bitmap(sb);
41 affs_brelse(sbi->s_root_bh); 40 affs_brelse(sbi->s_root_bh);
42 kfree(sbi); 41 kfree(sbi);
@@ -198,10 +197,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
198 *mount_opts |= SF_MUFS; 197 *mount_opts |= SF_MUFS;
199 break; 198 break;
200 case Opt_prefix: 199 case Opt_prefix:
201 if (*prefix) { /* Free any previous prefix */ 200 /* Free any previous prefix */
202 kfree(*prefix); 201 kfree(*prefix);
203 *prefix = NULL; 202 *prefix = NULL;
204 }
205 *prefix = match_strdup(&args[0]); 203 *prefix = match_strdup(&args[0]);
206 if (!*prefix) 204 if (!*prefix)
207 return 0; 205 return 0;
@@ -462,11 +460,9 @@ got_root:
462out_error: 460out_error:
463 if (root_inode) 461 if (root_inode)
464 iput(root_inode); 462 iput(root_inode);
465 if (sbi->s_bitmap) 463 kfree(sbi->s_bitmap);
466 kfree(sbi->s_bitmap);
467 affs_brelse(root_bh); 464 affs_brelse(root_bh);
468 if (sbi->s_prefix) 465 kfree(sbi->s_prefix);
469 kfree(sbi->s_prefix);
470 kfree(sbi); 466 kfree(sbi);
471 sb->s_fs_info = NULL; 467 sb->s_fs_info = NULL;
472 return -EINVAL; 468 return -EINVAL;