summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/dir.c8
-rw-r--r--fs/ceph/file.c7
-rw-r--r--fs/ceph/super.h2
3 files changed, 7 insertions, 10 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index d8bfabe..80c848e 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -635,7 +635,7 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
}
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned flags, umode_t mode,
+ struct file *file, unsigned flags, umode_t mode,
int *opened)
{
int err;
@@ -649,7 +649,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
if (err < 0)
return err;
- return ceph_lookup_open(dir, dentry, od, flags, mode, opened);
+ return ceph_lookup_open(dir, dentry, file, flags, mode, opened);
}
if (d_unhashed(dentry)) {
@@ -663,12 +663,12 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
/* We don't deal with positive dentries here */
if (dentry->d_inode) {
- finish_no_open(od, res);
+ finish_no_open(file, res);
return 1;
}
*opened |= FILE_CREATED;
- err = ceph_lookup_open(dir, dentry, od, flags, mode, opened);
+ err = ceph_lookup_open(dir, dentry, file, flags, mode, opened);
dput(res);
return err;
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index b8cc3ee..1b81d6c 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -214,12 +214,11 @@ out:
* ceph_release gets called). So fear not!
*/
int ceph_lookup_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned flags, umode_t mode,
+ struct file *file, 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;
- struct file *file = NULL;
struct ceph_mds_request *req;
struct dentry *ret;
int err;
@@ -248,9 +247,7 @@ int ceph_lookup_open(struct inode *dir, struct dentry *dentry,
err = ceph_handle_notrace_create(dir, dentry);
if (err)
goto out;
- file = finish_open(od, req->r_dentry, ceph_open, opened);
- if (IS_ERR(file))
- err = PTR_ERR(file);
+ err = finish_open(file, req->r_dentry, ceph_open, opened);
out:
ret = ceph_finish_lookup(req, dentry, err);
ceph_mdsc_put_request(req);
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index f7e8e82..f4d5522 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -807,7 +807,7 @@ extern int ceph_copy_from_page_vector(struct page **pages,
extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags);
extern int ceph_open(struct inode *inode, struct file *file);
extern int ceph_lookup_open(struct inode *dir, struct dentry *dentry,
- struct opendata *od, unsigned flags,
+ struct file *od, unsigned flags,
umode_t mode, int *opened);
extern int ceph_release(struct inode *inode, struct file *filp);
OpenPOWER on IntegriCloud