aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/namei.c')
-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,