Skip to content

Commit

Permalink
hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
Browse files Browse the repository at this point in the history
There is a misprint in resource deallocation code on error path in
hfsplus_fill_super(): the sbi->alloc_file inode is iput twice,
while the root inode in not iput at all.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
khoroshilov authored and Christoph Hellwig committed Jun 30, 2011
1 parent 50176dd commit 032016a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
out_put_hidden_dir:
iput(sbi->hidden_dir);
out_put_root:
iput(sbi->alloc_file);
iput(root);
out_put_alloc_file:
iput(sbi->alloc_file);
out_close_cat_tree:
Expand Down

0 comments on commit 032016a

Please sign in to comment.