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( | |||
1053 | struct dentry *dentry, | 1053 | struct dentry *dentry, |
1054 | umode_t mode) | 1054 | umode_t mode) |
1055 | { | 1055 | { |
1056 | int error; | 1056 | int error; |
1057 | struct xfs_inode *ip; | ||
1058 | struct inode *inode; | ||
1057 | 1059 | ||
1058 | error = xfs_create_tmpfile(XFS_I(dir), dentry, mode); | 1060 | error = xfs_create_tmpfile(XFS_I(dir), dentry, mode, &ip); |
1061 | if (unlikely(error)) | ||
1062 | return -error; | ||
1059 | 1063 | ||
1060 | return -error; | 1064 | inode = VFS_I(ip); |
1065 | |||
1066 | error = xfs_init_security(inode, dir, &dentry->d_name); | ||
1067 | if (unlikely(error)) { | ||
1068 | iput(inode); | ||
1069 | return -error; | ||
1070 | } | ||
1071 | |||
1072 | d_tmpfile(dentry, inode); | ||
1073 | |||
1074 | return 0; | ||
1061 | } | 1075 | } |
1062 | 1076 | ||
1063 | static const struct inode_operations xfs_inode_operations = { | 1077 | static const struct inode_operations xfs_inode_operations = { |