|
@@ -359,11 +359,9 @@ struct inode_operations {
|
|
|
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
|
|
int (*removexattr) (struct dentry *, const char *);
|
|
|
void (*update_time)(struct inode *, struct timespec *, int);
|
|
|
- int (*atomic_open)(struct inode *, struct dentry *,
|
|
|
+ int (*atomic_open)(struct inode *, struct dentry *, struct file *,
|
|
|
+ unsigned open_flag, umode_t create_mode, int *opened);
|
|
|
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
|
|
|
-} ____cacheline_aligned;
|
|
|
- struct file *, unsigned open_flag,
|
|
|
- umode_t create_mode, int *opened);
|
|
|
};
|
|
|
|
|
|
Again, all methods are called without any locks being held, unless
|
|
@@ -470,9 +468,11 @@ otherwise noted.
|
|
|
method the filesystem can look up, possibly create and open the file in
|
|
|
one atomic operation. If it cannot perform this (e.g. the file type
|
|
|
turned out to be wrong) it may signal this by returning 1 instead of
|
|
|
- usual 0 or -ve . This method is only called if the last
|
|
|
- component is negative or needs lookup. Cached positive dentries are
|
|
|
- still handled by f_op->open().
|
|
|
+ usual 0 or -ve . This method is only called if the last component is
|
|
|
+ negative or needs lookup. Cached positive dentries are still handled by
|
|
|
+ f_op->open(). If the file was created, the FILE_CREATED flag should be
|
|
|
+ set in "opened". In case of O_EXCL the method must only succeed if the
|
|
|
+ file didn't exist and hence FILE_CREATED shall always be set on success.
|
|
|
|
|
|
tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to
|
|
|
atomically creating, opening and unlinking a file in given directory.
|