diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-22 04:40:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:33:39 -0400 |
commit | 30d904947459cca2beb69e0110716f5248b31f2a (patch) | |
tree | 024e2a913266377d234147b14b7eb37017546173 /fs/ceph | |
parent | a4a3bdd778715999ddfeefdc52ab76254580fa76 (diff) |
kill struct opendata
Just pass struct file *. Methods are happier that way...
There's no need to return struct file * from finish_open() now,
so let it return int. Next: saner prototypes for parts in
namei.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/dir.c | 8 | ||||
-rw-r--r-- | fs/ceph/file.c | 7 | ||||
-rw-r--r-- | fs/ceph/super.h | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index d8bfabeeaa25..80c848e05390 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, | |||
635 | } | 635 | } |
636 | 636 | ||
637 | int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | 637 | int ceph_atomic_open(struct inode *dir, struct dentry *dentry, |
638 | struct opendata *od, unsigned flags, umode_t mode, | 638 | struct file *file, unsigned flags, umode_t mode, |
639 | int *opened) | 639 | int *opened) |
640 | { | 640 | { |
641 | int err; | 641 | int err; |
@@ -649,7 +649,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | |||
649 | if (err < 0) | 649 | if (err < 0) |
650 | return err; | 650 | return err; |
651 | 651 | ||
652 | return ceph_lookup_open(dir, dentry, od, flags, mode, opened); | 652 | return ceph_lookup_open(dir, dentry, file, flags, mode, opened); |
653 | } | 653 | } |
654 | 654 | ||
655 | if (d_unhashed(dentry)) { | 655 | if (d_unhashed(dentry)) { |
@@ -663,12 +663,12 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, | |||
663 | 663 | ||
664 | /* We don't deal with positive dentries here */ | 664 | /* We don't deal with positive dentries here */ |
665 | if (dentry->d_inode) { | 665 | if (dentry->d_inode) { |
666 | finish_no_open(od, res); | 666 | finish_no_open(file, res); |
667 | return 1; | 667 | return 1; |
668 | } | 668 | } |
669 | 669 | ||
670 | *opened |= FILE_CREATED; | 670 | *opened |= FILE_CREATED; |
671 | err = ceph_lookup_open(dir, dentry, od, flags, mode, opened); | 671 | err = ceph_lookup_open(dir, dentry, file, flags, mode, opened); |
672 | dput(res); | 672 | dput(res); |
673 | 673 | ||
674 | return err; | 674 | return err; |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index b8cc3ee5401e..1b81d6c31878 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -214,12 +214,11 @@ out: | |||
214 | * ceph_release gets called). So fear not! | 214 | * ceph_release gets called). So fear not! |
215 | */ | 215 | */ |
216 | int ceph_lookup_open(struct inode *dir, struct dentry *dentry, | 216 | int ceph_lookup_open(struct inode *dir, struct dentry *dentry, |
217 | struct opendata *od, unsigned flags, umode_t mode, | 217 | struct file *file, unsigned flags, umode_t mode, |
218 | int *opened) | 218 | int *opened) |
219 | { | 219 | { |
220 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); | 220 | struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); |
221 | struct ceph_mds_client *mdsc = fsc->mdsc; | 221 | struct ceph_mds_client *mdsc = fsc->mdsc; |
222 | struct file *file = NULL; | ||
223 | struct ceph_mds_request *req; | 222 | struct ceph_mds_request *req; |
224 | struct dentry *ret; | 223 | struct dentry *ret; |
225 | int err; | 224 | int err; |
@@ -248,9 +247,7 @@ int ceph_lookup_open(struct inode *dir, struct dentry *dentry, | |||
248 | err = ceph_handle_notrace_create(dir, dentry); | 247 | err = ceph_handle_notrace_create(dir, dentry); |
249 | if (err) | 248 | if (err) |
250 | goto out; | 249 | goto out; |
251 | file = finish_open(od, req->r_dentry, ceph_open, opened); | 250 | err = finish_open(file, req->r_dentry, ceph_open, opened); |
252 | if (IS_ERR(file)) | ||
253 | err = PTR_ERR(file); | ||
254 | out: | 251 | out: |
255 | ret = ceph_finish_lookup(req, dentry, err); | 252 | ret = ceph_finish_lookup(req, dentry, err); |
256 | ceph_mdsc_put_request(req); | 253 | ceph_mdsc_put_request(req); |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index f7e8e82ec47f..f4d5522cb619 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, | |||
807 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); | 807 | extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); |
808 | extern int ceph_open(struct inode *inode, struct file *file); | 808 | extern int ceph_open(struct inode *inode, struct file *file); |
809 | extern int ceph_lookup_open(struct inode *dir, struct dentry *dentry, | 809 | extern int ceph_lookup_open(struct inode *dir, struct dentry *dentry, |
810 | struct opendata *od, unsigned flags, | 810 | struct file *od, unsigned flags, |
811 | umode_t mode, int *opened); | 811 | umode_t mode, int *opened); |
812 | extern int ceph_release(struct inode *inode, struct file *filp); | 812 | extern int ceph_release(struct inode *inode, struct file *filp); |
813 | 813 | ||