Commit 656d09df authored by Al Viro's avatar Al Viro

udf: provide ->tmpfile()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e6bbef95
...@@ -594,6 +594,29 @@ static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode, ...@@ -594,6 +594,29 @@ static int udf_create(struct inode *dir, struct dentry *dentry, umode_t mode,
return 0; 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, static int udf_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
dev_t rdev) dev_t rdev)
{ {
...@@ -1311,6 +1334,7 @@ const struct inode_operations udf_dir_inode_operations = { ...@@ -1311,6 +1334,7 @@ const struct inode_operations udf_dir_inode_operations = {
.rmdir = udf_rmdir, .rmdir = udf_rmdir,
.mknod = udf_mknod, .mknod = udf_mknod,
.rename = udf_rename, .rename = udf_rename,
.tmpfile = udf_tmpfile,
}; };
const struct inode_operations udf_symlink_inode_operations = { const struct inode_operations udf_symlink_inode_operations = {
.readlink = generic_readlink, .readlink = generic_readlink,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment