diff options
Diffstat (limited to 'fs/minix/namei.c')
-rw-r--r-- | fs/minix/namei.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 0db73d9dd668..cd950e2331b6 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c | |||
@@ -54,6 +54,18 @@ static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, | |||
54 | return error; | 54 | return error; |
55 | } | 55 | } |
56 | 56 | ||
57 | static int minix_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) | ||
58 | { | ||
59 | int error; | ||
60 | struct inode *inode = minix_new_inode(dir, mode, &error); | ||
61 | if (inode) { | ||
62 | minix_set_inode(inode, 0); | ||
63 | mark_inode_dirty(inode); | ||
64 | d_tmpfile(dentry, inode); | ||
65 | } | ||
66 | return error; | ||
67 | } | ||
68 | |||
57 | static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 69 | static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
58 | bool excl) | 70 | bool excl) |
59 | { | 71 | { |
@@ -254,4 +266,5 @@ const struct inode_operations minix_dir_inode_operations = { | |||
254 | .mknod = minix_mknod, | 266 | .mknod = minix_mknod, |
255 | .rename = minix_rename, | 267 | .rename = minix_rename, |
256 | .getattr = minix_getattr, | 268 | .getattr = minix_getattr, |
269 | .tmpfile = minix_tmpfile, | ||
257 | }; | 270 | }; |