aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-06-12 01:35:33 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 04:57:12 -0400
commit656d09df8f73b6f2ae0c7205c6eb79f1642353f8 (patch)
tree0210e8b1bc29ca67c3d37eaa98d636de3c736a80 /fs/udf
parente6bbef95429374fd3cac81c36b5894f55b2612dc (diff)
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 102c072c6bbf..5f6fc17d6bc5 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,
594 return 0; 594 return 0;
595} 595}
596 596
597static int udf_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
598{
599 struct inode *inode;
600 struct udf_inode_info *iinfo;
601 int err;
602
603 inode = udf_new_inode(dir, mode, &err);
604 if (!inode)
605 return err;
606
607 iinfo = UDF_I(inode);
608 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
609 inode->i_data.a_ops = &udf_adinicb_aops;
610 else
611 inode->i_data.a_ops = &udf_aops;
612 inode->i_op = &udf_file_inode_operations;
613 inode->i_fop = &udf_file_operations;
614 mark_inode_dirty(inode);
615
616 d_tmpfile(dentry, inode);
617 return 0;
618}
619
597static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, 620static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
598 dev_t rdev) 621 dev_t rdev)
599{ 622{
@@ -1311,6 +1334,7 @@ const struct inode_operations udf_dir_inode_operations = {
1311 .rmdir = udf_rmdir, 1334 .rmdir = udf_rmdir,
1312 .mknod = udf_mknod, 1335 .mknod = udf_mknod,
1313 .rename = udf_rename, 1336 .rename = udf_rename,
1337 .tmpfile = udf_tmpfile,
1314}; 1338};
1315const struct inode_operations udf_symlink_inode_operations = { 1339const struct inode_operations udf_symlink_inode_operations = {
1316 .readlink = generic_readlink, 1340 .readlink = generic_readlink,