diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-26 06:03:56 -0500 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-11-26 06:03:56 -0500 |
commit | 43901aabd7a043e62e24e9459dc4949b4cd69f07 (patch) | |
tree | a3c111b3110852bd46a62b31bd510f08d6b20e88 /fs/fuse/inode.c | |
parent | 0d179aa59285ceef529c125e181cbb79ff5245c2 (diff) |
fuse: add fuse_conn->release()
Add fuse_conn->release() so that fuse_conn can be embedded in other
structures.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 6c9fa03aa367..47c96fdca1ac 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -533,7 +533,7 @@ void fuse_conn_put(struct fuse_conn *fc) | |||
533 | fuse_request_free(fc->destroy_req); | 533 | fuse_request_free(fc->destroy_req); |
534 | mutex_destroy(&fc->inst_mutex); | 534 | mutex_destroy(&fc->inst_mutex); |
535 | bdi_destroy(&fc->bdi); | 535 | bdi_destroy(&fc->bdi); |
536 | kfree(fc); | 536 | fc->release(fc); |
537 | } | 537 | } |
538 | } | 538 | } |
539 | 539 | ||
@@ -789,6 +789,11 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) | |||
789 | fuse_request_send_background(fc, req); | 789 | fuse_request_send_background(fc, req); |
790 | } | 790 | } |
791 | 791 | ||
792 | static void fuse_free_conn(struct fuse_conn *fc) | ||
793 | { | ||
794 | kfree(fc); | ||
795 | } | ||
796 | |||
792 | static int fuse_fill_super(struct super_block *sb, void *data, int silent) | 797 | static int fuse_fill_super(struct super_block *sb, void *data, int silent) |
793 | { | 798 | { |
794 | struct fuse_conn *fc; | 799 | struct fuse_conn *fc; |
@@ -837,6 +842,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
837 | return err; | 842 | return err; |
838 | } | 843 | } |
839 | 844 | ||
845 | fc->release = fuse_free_conn; | ||
840 | fc->flags = d.flags; | 846 | fc->flags = d.flags; |
841 | fc->user_id = d.user_id; | 847 | fc->user_id = d.user_id; |
842 | fc->group_id = d.group_id; | 848 | fc->group_id = d.group_id; |