diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-18 20:22:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-18 20:22:22 -0400 |
commit | 3fe03debfc58aba8f5ddb32abd7343237d07714c (patch) | |
tree | f17d2fbf390810404f5d28f45ed5b379fa13c6ef /Documentation | |
parent | 9baa5059485d6559081d27d9b1fe1714f3fccab1 (diff) | |
parent | 8061a6fa564fe0e71601632758b78d2ba737663c (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
"atomic_open-related fixes (Miklos' series, with EEXIST-related parts
replaced with fix in fs/namei.c:atomic_open() instead of messing with
the instances) + race fix in autofs + leak on failure exit in 9p"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
9p: don't forget to destroy inode cache if fscache registration fails
atomic_open: take care of EEXIST in no-open case with O_CREAT|O_EXCL in fs/namei.c
vfs: don't set FILE_CREATED before calling ->atomic_open()
nfs: set FILE_CREATED
gfs2: set FILE_CREATED
cifs: fix filp leak in cifs_atomic_open()
vfs: improve i_op->atomic_open() documentation
autofs4: close the races around autofs4_notify_daemon()
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/vfs.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index f93a88250a44..deb48b5fd883 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -359,11 +359,9 @@ struct inode_operations { | |||
359 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 359 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
360 | int (*removexattr) (struct dentry *, const char *); | 360 | int (*removexattr) (struct dentry *, const char *); |
361 | void (*update_time)(struct inode *, struct timespec *, int); | 361 | void (*update_time)(struct inode *, struct timespec *, int); |
362 | int (*atomic_open)(struct inode *, struct dentry *, | 362 | int (*atomic_open)(struct inode *, struct dentry *, struct file *, |
363 | unsigned open_flag, umode_t create_mode, int *opened); | ||
363 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | 364 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); |
364 | } ____cacheline_aligned; | ||
365 | struct file *, unsigned open_flag, | ||
366 | umode_t create_mode, int *opened); | ||
367 | }; | 365 | }; |
368 | 366 | ||
369 | Again, all methods are called without any locks being held, unless | 367 | Again, all methods are called without any locks being held, unless |
@@ -470,9 +468,11 @@ otherwise noted. | |||
470 | method the filesystem can look up, possibly create and open the file in | 468 | method the filesystem can look up, possibly create and open the file in |
471 | one atomic operation. If it cannot perform this (e.g. the file type | 469 | one atomic operation. If it cannot perform this (e.g. the file type |
472 | turned out to be wrong) it may signal this by returning 1 instead of | 470 | turned out to be wrong) it may signal this by returning 1 instead of |
473 | usual 0 or -ve . This method is only called if the last | 471 | usual 0 or -ve . This method is only called if the last component is |
474 | component is negative or needs lookup. Cached positive dentries are | 472 | negative or needs lookup. Cached positive dentries are still handled by |
475 | still handled by f_op->open(). | 473 | f_op->open(). If the file was created, the FILE_CREATED flag should be |
474 | set in "opened". In case of O_EXCL the method must only succeed if the | ||
475 | file didn't exist and hence FILE_CREATED shall always be set on success. | ||
476 | 476 | ||
477 | tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to | 477 | tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to |
478 | atomically creating, opening and unlinking a file in given directory. | 478 | atomically creating, opening and unlinking a file in given directory. |