diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2008-05-21 11:45:16 -0400 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2008-05-21 11:45:16 -0400 |
commit | 6536d2891ba2c4e837ba8478dc13bb173ed24a23 (patch) | |
tree | 22faac43152fb205f925bcec9c1c003573147a01 /fs/jfs/super.c | |
parent | b2e03ca7485cac033a0667d9e45e28d32fdee9a5 (diff) |
JFS: skip bad iput() call in error path
If jfs_iget() fails, we can't call iput() on the returned error.
Thanks to Eric Sesterhenn's fuzzer testing for reporting the problem.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r-- | fs/jfs/super.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 50ea65451732..0288e6d7936a 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -499,7 +499,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
499 | inode = jfs_iget(sb, ROOT_I); | 499 | inode = jfs_iget(sb, ROOT_I); |
500 | if (IS_ERR(inode)) { | 500 | if (IS_ERR(inode)) { |
501 | ret = PTR_ERR(inode); | 501 | ret = PTR_ERR(inode); |
502 | goto out_no_root; | 502 | goto out_no_rw; |
503 | } | 503 | } |
504 | sb->s_root = d_alloc_root(inode); | 504 | sb->s_root = d_alloc_root(inode); |
505 | if (!sb->s_root) | 505 | if (!sb->s_root) |
@@ -521,9 +521,8 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) | |||
521 | return 0; | 521 | return 0; |
522 | 522 | ||
523 | out_no_root: | 523 | out_no_root: |
524 | jfs_err("jfs_read_super: get root inode failed"); | 524 | jfs_err("jfs_read_super: get root dentry failed"); |
525 | if (inode) | 525 | iput(inode); |
526 | iput(inode); | ||
527 | 526 | ||
528 | out_no_rw: | 527 | out_no_rw: |
529 | rc = jfs_umount(sb); | 528 | rc = jfs_umount(sb); |