/* Following a failed create operation, we drop the dentry rather than retain a negative dentry. This avoids a problem in the event that the operation succeeded on the server, but an error in the reply path made it appear to have failed.  */
static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *)
/* Following a failed create operation, we drop the dentry rather than retain a negative dentry. This avoids a problem in the event that the operation succeeded on the server, but an error in the reply path made it appear to have failed.  */
static int nfs_create(struct inode *, struct dentry *, int, struct nameidata *)
{
	struct iattr attr;
	int error;
	int open_flags = 0;
	dfprintk(VFS, "NFS: create(%s/%ld), %s\n",
			dir->i_sb->s_id, dir->i_ino, dentry->d_name.name);
	attr.ia_mode = mode;
	attr.ia_valid = ATTR_MODE;
	if ((nd->flags & LOOKUP_CREATE) != 0)
		open_flags = nd->intent.open.flags;
	error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, nd);
	if (error != 0)
		goto out_err;
	return 0;
out_err:
	d_drop(dentry);
	return error;
}