From ef0cceb36aef8f47f08f19abda4da5311f869934 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Thu, 5 May 2005 16:15:34 -0700 Subject: [PATCH] --- yaml --- r: 993 b: refs/heads/master c: 51a141104a37369be2822f423ed4444aa34d26a2 h: refs/heads/master i: 991: ef4afc64646180fd5e7c00c12d32dca890647d23 v: v3 --- [refs] | 2 +- trunk/fs/hostfs/hostfs_kern.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b410d54ef14b..e7957f3a0ee7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0b8d32020681535700e7bd4dac29ecf25d944ae +refs/heads/master: 51a141104a37369be2822f423ed4444aa34d26a2 diff --git a/trunk/fs/hostfs/hostfs_kern.c b/trunk/fs/hostfs/hostfs_kern.c index e6c63d9cac7b..14a0d339d036 100644 --- a/trunk/fs/hostfs/hostfs_kern.c +++ b/trunk/fs/hostfs/hostfs_kern.c @@ -991,13 +991,17 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) goto out_put; err = read_inode(root_inode); - if(err) - goto out_put; + if(err){ + /* No iput in this case because the dput does that for us */ + dput(sb->s_root); + sb->s_root = NULL; + goto out_free; + } return(0); out_put: - iput(root_inode); + iput(root_inode); out_free: kfree(name); out: