summaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-22 12:39:14 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 16:33:35 +0400
commitd95852777bc8ba6b3ad3397d495c5f9dd8ca8383 (patch)
tree96e9d8b1d33c4f6f7b5ba5be0fa4fd8f77c7a67f /Documentation/filesystems
parent3d8a00d2099ebc6d5a6e95fadaf861709d9919a8 (diff)
downloadblackbird-op-linux-d95852777bc8ba6b3ad3397d495c5f9dd8ca8383.tar.gz
blackbird-op-linux-d95852777bc8ba6b3ad3397d495c5f9dd8ca8383.zip
make ->atomic_open() return int
Change of calling conventions: old new NULL 1 file 0 ERR_PTR(-ve) -ve Caller *knows* that struct file *; no need to return it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/vfs.txt6
2 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index af4e45bd6cfa..46a24a6ed095 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -62,7 +62,7 @@ ata *);
int (*removexattr) (struct dentry *, const char *);
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
void (*update_time)(struct inode *, struct timespec *, int);
- struct file * (*atomic_open)(struct inode *, struct dentry *,
+ int (*atomic_open)(struct inode *, struct dentry *,
struct opendata *, unsigned open_flag,
umode_t create_mode, int *opened);
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index d7121051afcd..d0d690bbc4c7 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -364,7 +364,7 @@ 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);
- struct file * (*atomic_open)(struct inode *, struct dentry *,
+ int (*atomic_open)(struct inode *, struct dentry *,
struct opendata *, unsigned open_flag,
umode_t create_mode, int *opened);
};
@@ -482,8 +482,8 @@ otherwise noted.
atomic_open: called on the last component of an open. Using this optional
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 NULL instead of
- an open struct file pointer. This method is only called if the last
+ 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().
OpenPOWER on IntegriCloud