X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Ffuse%2Fcontrol.c;h=105d4a271e073b0c7d60660057d9716d798f9d1d;hb=ecd27b92fbb41f779d857632a69bd45dbaf0f915;hp=16b39c053d470c3d3cc71c3881c0f5c8c834864b;hpb=95f3eff6997ae4a6754c1d874ec0a414d97c44d1;p=linux-2.6 diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 16b39c053d..105d4a271e 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -23,7 +23,7 @@ static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file) { struct fuse_conn *fc; mutex_lock(&fuse_mutex); - fc = file->f_dentry->d_inode->i_private; + fc = file->f_path.dentry->d_inode->i_private; if (fc) fc = fuse_conn_get(fc); mutex_unlock(&fuse_mutex); @@ -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; @@ -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);