lkml.org 
[lkml]   [2011]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
Date
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>
---
fs/hfsplus/super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 07a0502..8bfbd38 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -504,7 +504,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:
--
1.7.4.1


\
 
 \ /
  Last update: 2011-06-23 23:19    [W:0.056 / U:3.780 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site