Commit 48bde8d3 authored by Al Viro's avatar Al Viro

Document ->tmpfile()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent af51a2ac
...@@ -64,6 +64,7 @@ prototypes: ...@@ -64,6 +64,7 @@ prototypes:
int (*atomic_open)(struct inode *, struct dentry *, int (*atomic_open)(struct inode *, struct dentry *,
struct file *, unsigned open_flag, struct file *, unsigned open_flag,
umode_t create_mode, int *opened); umode_t create_mode, int *opened);
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
locking rules: locking rules:
all may block all may block
...@@ -91,6 +92,7 @@ removexattr: yes ...@@ -91,6 +92,7 @@ removexattr: yes
fiemap: no fiemap: no
update_time: no update_time: no
atomic_open: yes atomic_open: yes
tmpfile: no
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim. victim.
......
...@@ -360,6 +360,8 @@ struct inode_operations { ...@@ -360,6 +360,8 @@ struct inode_operations {
int (*removexattr) (struct dentry *, const char *); int (*removexattr) (struct dentry *, const char *);
void (*update_time)(struct inode *, struct timespec *, int); void (*update_time)(struct inode *, struct timespec *, int);
int (*atomic_open)(struct inode *, struct dentry *, int (*atomic_open)(struct inode *, struct dentry *,
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
} ____cacheline_aligned;
struct file *, unsigned open_flag, struct file *, unsigned open_flag,
umode_t create_mode, int *opened); umode_t create_mode, int *opened);
}; };
...@@ -472,6 +474,9 @@ otherwise noted. ...@@ -472,6 +474,9 @@ otherwise noted.
component is negative or needs lookup. Cached positive dentries are component is negative or needs lookup. Cached positive dentries are
still handled by f_op->open(). still handled by f_op->open().
tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to
atomically creating, opening and unlinking a file in given directory.
The Address Space Object The Address Space Object
======================== ========================
......
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