From: Miklos Szeredi <miklos@szeredi.hu>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] fuse: comment control filesystem
Date: Fri, 23 Jun 2006 19:24:42 +0200 [thread overview]
Message-ID: <E1FtpOc-0002KA-00@dorka.pomaz.szeredi.hu> (raw)
In-Reply-To: <E1FtpMu-0002JS-00@dorka.pomaz.szeredi.hu> (message from Miklos Szeredi on Fri, 23 Jun 2006 19:22:56 +0200)
Sprinkle a few comments on the not-so-trivial parts of the control
filesystem.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
---
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;
prev parent reply other threads:[~2006-06-23 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 17:22 [PATCH 1/2] fuse: scramble lock owner ID Miklos Szeredi
2006-06-23 17:24 ` Miklos Szeredi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1FtpOc-0002KA-00@dorka.pomaz.szeredi.hu \
--to=miklos@szeredi.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®