浏览代码

[PATCH] double iput() on failure exit in hugetlb

once we'd done d_instantiate(), we should only do dput().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 17 年之前
父节点
当前提交
b4d232e65f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/hugetlbfs/inode.c

+ 1 - 1
fs/hugetlbfs/inode.c

@@ -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;