]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Thu, 23 Jun 2011 21:15:02 +0000 (01:15 +0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 30 Jun 2011 11:38:39 +0000 (13:38 +0200)
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 <khoroshilov@ispras.ru>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/hfsplus/super.c

index b49b55584c844e8578b1aecb090affa73991d0cc..84a47b709f51835de4dc368e30318abddbbce226 100644 (file)
@@ -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: