diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-28 10:56:37 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2009-04-28 10:56:37 -0400 |
commit | c7b7143c6342b8751d47b03a025ac5c0ac1ae809 (patch) | |
tree | 9bb528e90ba682b96f5a34ff5ee777ab3c260aef /fs/fuse/fuse_i.h | |
parent | 2106cb18930312af9325d3418e138569c5b903cc (diff) |
fuse: clean up args in fuse_finish_open() and fuse_release_fill()
Move setting ff->fh, ff->nodeid and file->private_data outside
fuse_finish_open(). Add ->open_flags member to struct fuse_file.
This simplifies the argument passing to fuse_finish_open() and
fuse_release_fill(), and paves the way for creating an open helper
that doesn't need an inode pointer.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index a51f63c7d423..ce46c120f48a 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -119,6 +119,9 @@ struct fuse_file { | |||
119 | /** Refcount */ | 119 | /** Refcount */ |
120 | atomic_t count; | 120 | atomic_t count; |
121 | 121 | ||
122 | /** FOPEN_* flags returned by open */ | ||
123 | u32 open_flags; | ||
124 | |||
122 | /** Entry on inode's write_files list */ | 125 | /** Entry on inode's write_files list */ |
123 | struct list_head write_entry; | 126 | struct list_head write_entry; |
124 | 127 | ||
@@ -528,12 +531,12 @@ void fuse_read_fill(struct fuse_req *req, struct file *file, | |||
528 | int fuse_open_common(struct inode *inode, struct file *file, int isdir); | 531 | int fuse_open_common(struct inode *inode, struct file *file, int isdir); |
529 | 532 | ||
530 | struct fuse_file *fuse_file_alloc(struct fuse_conn *fc); | 533 | struct fuse_file *fuse_file_alloc(struct fuse_conn *fc); |
534 | struct fuse_file *fuse_file_get(struct fuse_file *ff); | ||
531 | void fuse_file_free(struct fuse_file *ff); | 535 | void fuse_file_free(struct fuse_file *ff); |
532 | void fuse_finish_open(struct inode *inode, struct file *file, | 536 | void fuse_finish_open(struct inode *inode, struct file *file); |
533 | struct fuse_file *ff, struct fuse_open_out *outarg); | ||
534 | 537 | ||
535 | /** Fill in ff->reserved_req with a RELEASE request */ | 538 | /** Fill in ff->reserved_req with a RELEASE request */ |
536 | void fuse_release_fill(struct fuse_file *ff, u64 nodeid, int flags, int opcode); | 539 | void fuse_release_fill(struct fuse_file *ff, int flags, int opcode); |
537 | 540 | ||
538 | /** | 541 | /** |
539 | * Send RELEASE or RELEASEDIR request | 542 | * Send RELEASE or RELEASEDIR request |