diff options
author | Mark Brown <broonie@linaro.org> | 2014-05-22 00:17:27 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-22 00:17:27 +0100 |
commit | bfbc344732badffe94f096f929e4a105b3b92d1f (patch) | |
tree | f4fc6c06108495bd2c33ecff68c065514e66a8cc /fs/xfs/xfs_iops.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
parent | c6466950e917890be3050171f6745ccb9d91d35f (diff) |
Merge tag 'mfd-regulator-v3.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-bcm590xxx
Immutable branch between MFD and Regulator due for v3.16 merge-window.
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 89b07e43ca2..ef1ca010f41 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 = { |