aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_kern.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index a88ad2924851..14a0d339d036 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -521,7 +521,7 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
521static struct address_space_operations hostfs_aops = { 521static struct address_space_operations hostfs_aops = {
522 .writepage = hostfs_writepage, 522 .writepage = hostfs_writepage,
523 .readpage = hostfs_readpage, 523 .readpage = hostfs_readpage,
524/* .set_page_dirty = __set_page_dirty_nobuffers, */ 524 .set_page_dirty = __set_page_dirty_nobuffers,
525 .prepare_write = hostfs_prepare_write, 525 .prepare_write = hostfs_prepare_write,
526 .commit_write = hostfs_commit_write 526 .commit_write = hostfs_commit_write
527}; 527};
@@ -991,13 +991,17 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
991 goto out_put; 991 goto out_put;
992 992
993 err = read_inode(root_inode); 993 err = read_inode(root_inode);
994 if(err) 994 if(err){
995 goto out_put; 995 /* No iput in this case because the dput does that for us */
996 dput(sb->s_root);
997 sb->s_root = NULL;
998 goto out_free;
999 }
996 1000
997 return(0); 1001 return(0);
998 1002
999 out_put: 1003 out_put:
1000 iput(root_inode); 1004 iput(root_inode);
1001 out_free: 1005 out_free:
1002 kfree(name); 1006 kfree(name);
1003 out: 1007 out: