Skip to content

Commit 032016a

Browse files
khoroshilovChristoph Hellwig
authored andcommitted
hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
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]>
1 parent 50176dd commit 032016a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/hfsplus/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
500500
out_put_hidden_dir:
501501
iput(sbi->hidden_dir);
502502
out_put_root:
503-
iput(sbi->alloc_file);
503+
iput(root);
504504
out_put_alloc_file:
505505
iput(sbi->alloc_file);
506506
out_close_cat_tree:

0 commit comments

Comments
 (0)