aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-06-12 09:35:33 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:57:12 +0400
commit656d09df8f73b6f2ae0c7205c6eb79f1642353f8 (patch)
tree0210e8b1bc29ca67c3d37eaa98d636de3c736a80 /fs/udf
parente6bbef95429374fd3cac81c36b5894f55b2612dc (diff)
downloadkernel_goldelico_gta04-656d09df8f73b6f2ae0c7205c6eb79f1642353f8.zip
kernel_goldelico_gta04-656d09df8f73b6f2ae0c7205c6eb79f1642353f8.tar.gz
kernel_goldelico_gta04-656d09df8f73b6f2ae0c7205c6eb79f1642353f8.tar.bz2
udf: provide ->tmpfile()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/namei.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 102c072..5f6fc17 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -594,6 +594,29 @@ static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode,
return 0;
}
+static int udf_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
+{
+ struct inode *inode;
+ struct udf_inode_info *iinfo;
+ int err;
+
+ inode = udf_new_inode(dir, mode, &err);
+ if (!inode)
+ return err;
+
+ iinfo = UDF_I(inode);
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
+ inode->i_data.a_ops = &udf_adinicb_aops;
+ else
+ inode->i_data.a_ops = &udf_aops;
+ inode->i_op = &udf_file_inode_operations;
+ inode->i_fop = &udf_file_operations;
+ mark_inode_dirty(inode);
+
+ d_tmpfile(dentry, inode);
+ return 0;
+}
+
static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
dev_t rdev)
{
@@ -1311,6 +1334,7 @@ const struct inode_operations udf_dir_inode_operations = {
.rmdir = udf_rmdir,
.mknod = udf_mknod,
.rename = udf_rename,
+ .tmpfile = udf_tmpfile,
};
const struct inode_operations udf_symlink_inode_operations = {
.readlink = generic_readlink,