summaryrefslogtreecommitdiff
path: root/fs/ceph/file.c
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 /fs/ceph/file.c
parent3d8a00d2099ebc6d5a6e95fadaf861709d9919a8 (diff)
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 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 4c304a90d046..b8cc3ee5401e 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -213,9 +213,9 @@ out:
* may_open() fails, the struct *file gets cleaned up (i.e.
* ceph_release gets called). So fear not!
*/
-struct file *ceph_lookup_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned flags, umode_t mode,
- int *opened)
+int ceph_lookup_open(struct inode *dir, struct dentry *dentry,
+ struct opendata *od, unsigned flags, umode_t mode,
+ int *opened)
{
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
struct ceph_mds_client *mdsc = fsc->mdsc;
@@ -230,7 +230,7 @@ struct file *ceph_lookup_open(struct inode *dir, struct dentry *dentry,
/* do the open */
req = prepare_open_request(dir->i_sb, flags, mode);
if (IS_ERR(req))
- return ERR_CAST(req);
+ return PTR_ERR(req);
req->r_dentry = dget(dentry);
req->r_num_caps = 2;
if (flags & O_CREAT) {
@@ -257,10 +257,10 @@ out:
dout("ceph_lookup_open result=%p\n", ret);
if (IS_ERR(ret))
- return ERR_CAST(ret);
+ return PTR_ERR(ret);
dput(ret);
- return err ? ERR_PTR(err) : file;
+ return err;
}
int ceph_release(struct inode *inode, struct file *file)