[PATCH] double iput() on failure exit in hugetlb
Al Viro [Sat, 23 Feb 2008 10:59:19 +0000 (05:59 -0500)]
once we'd done d_instantiate(), we should only do dput().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

fs/hugetlbfs/inode.c

index eee9487..6846785 100644 (file)
@@ -954,7 +954,7 @@ struct file *hugetlb_file_setup(const char *name, size_t size)
                        FMODE_WRITE | FMODE_READ,
                        &hugetlbfs_file_operations);
        if (!file)
-               goto out_inode;
+               goto out_dentry; /* inode is already attached */
 
        return file;