diff options
Diffstat (limited to 'fs/xfs/xfs_iops.c')
| -rw-r--r-- | fs/xfs/xfs_iops.c | 20 | 
1 files changed, 17 insertions, 3 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 89b07e43ca28..ef1ca010f417 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1053,11 +1053,25 @@ xfs_vn_tmpfile(  	struct dentry	*dentry,  	umode_t		mode)  { -	int		error; +	int			error; +	struct xfs_inode	*ip; +	struct inode		*inode; -	error = xfs_create_tmpfile(XFS_I(dir), dentry, mode); +	error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip); +	if (unlikely(error)) +		return -error; -	return -error; +	inode = VFS_I(ip); + +	error = xfs_init_security(inode, dir, &dentry->d_name); +	if (unlikely(error)) { +		iput(inode); +		return -error; +	} + +	d_tmpfile(dentry, inode); + +	return 0;  }  static const struct inode_operations xfs_inode_operations = {  | 
