From f543f253f3aa721a24557d7df8259145bb01b734 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 16 Jan 2006 22:14:35 -0800 Subject: [PATCH] fuse: make fuse connection a kobject Kobjectify fuse_conn, and make it visible under /sys/fs/fuse/connections. Lacking any natural naming, connections are numbered. This patch doesn't add any attributes, just the infrastructure. Signed-off-by: Miklos Szeredi Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fuse/fuse_i.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'fs/fuse/fuse_i.h') diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index e824a09d315..6ef1e5f5873 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -196,9 +196,6 @@ struct fuse_req { * unmounted. */ struct fuse_conn { - /** Reference count */ - int count; - /** The user id for this mount */ uid_t user_id; @@ -288,6 +285,9 @@ struct fuse_conn { /** Backing dev info */ struct backing_dev_info bdi; + + /** kobject */ + struct kobject kobj; }; static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) @@ -300,6 +300,11 @@ static inline struct fuse_conn *get_fuse_conn(struct inode *inode) return get_fuse_conn_super(inode->i_sb); } +static inline struct fuse_conn *get_fuse_conn_kobj(struct kobject *obj) +{ + return container_of(obj, struct fuse_conn, kobj); +} + static inline struct fuse_inode *get_fuse_inode(struct inode *inode) { return container_of(inode, struct fuse_inode, inode); @@ -399,12 +404,6 @@ void fuse_init_symlink(struct inode *inode); */ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr); -/** - * Check if the connection can be released, and if yes, then free the - * connection structure - */ -void fuse_release_conn(struct fuse_conn *fc); - /** * Initialize the client device */ -- cgit v1.2.3-70-g09d2