]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fuse/control.c
Linux 2.6.28-rc1
[linux-2.6-omap-h63xx.git] / fs / fuse / control.c
index 8c58bd4539936d536ada3b3b98596002db5badd8..4f3cab32141584264789ab3446f962d631ba04ab 100644 (file)
@@ -73,7 +73,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent,
                                          struct fuse_conn *fc,
                                          const char *name,
                                          int mode, int nlink,
-                                         struct inode_operations *iop,
+                                         const struct inode_operations *iop,
                                          const struct file_operations *fop)
 {
        struct dentry *dentry;
@@ -117,7 +117,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc)
 
        parent = fuse_control_sb->s_root;
        inc_nlink(parent->d_inode);
-       sprintf(name, "%llu", (unsigned long long) fc->id);
+       sprintf(name, "%u", fc->dev);
        parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2,
                                     &simple_dir_inode_operations,
                                     &simple_dir_operations);
@@ -193,8 +193,12 @@ static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags,
 
 static void fuse_ctl_kill_sb(struct super_block *sb)
 {
+       struct fuse_conn *fc;
+
        mutex_lock(&fuse_mutex);
        fuse_control_sb = NULL;
+       list_for_each_entry(fc, &fuse_conn_list, entry)
+               fc->ctl_ndents = 0;
        mutex_unlock(&fuse_mutex);
 
        kill_litter_super(sb);