[PATCH 2/2] fuse: comment control filesystem

From: Miklos Szeredi
Date: Fri Jun 23 2006 - 13:23:51 EST


Sprinkle a few comments on the not-so-trivial parts of the control
filesystem.

Signed-off-by: Miklos Szeredi <miklos@xxxxxxxxxx>
---

Index: linux/fs/fuse/control.c
===================================================================
--- linux.orig/fs/fuse/control.c 2006-06-22 17:26:44.000000000 +0200
+++ linux/fs/fuse/control.c 2006-06-23 19:18:02.000000000 +0200
@@ -13,6 +13,10 @@

#define FUSE_CTL_SUPER_MAGIC 0x65735543

+/*
+ * This is non-NULL when the single instance of the control filesystem
+ * exists. Protected by fuse_mutex
+ */
static struct super_block *fuse_control_sb;

static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file)
@@ -89,6 +93,7 @@ static struct dentry *fuse_ctl_add_dentr
inode->i_uid = fc->user_id;
inode->i_gid = fc->group_id;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+ /* setting ->i_op to NULL is not allowed */
if (iop)
inode->i_op = iop;
inode->i_fop = fop;
@@ -98,6 +103,10 @@ static struct dentry *fuse_ctl_add_dentr
return dentry;
}

+/*
+ * Add a connection to the control filesystem (if it exists). Caller
+ * must host fuse_mutex
+ */
int fuse_ctl_add_conn(struct fuse_conn *fc)
{
struct dentry *parent;
@@ -128,6 +137,10 @@ int fuse_ctl_add_conn(struct fuse_conn *
return -ENOMEM;
}

+/*
+ * Remove a connection from the control filesystem (if it exists).
+ * Caller must host fuse_mutex
+ */
void fuse_ctl_remove_conn(struct fuse_conn *fc)
{
int i;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/