diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-10-13 09:54:24 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-10-13 09:54:24 +0000 |
commit | d6f8db71b84a139c1d74d6d0c654659951219c38 (patch) | |
tree | 58b30d5e92983a13bd4f294aaf6a0965733b7554 /kernel/control.c | |
parent | 856e5cb2e11d39e5051d1bcf0bd872aadfb777ae (diff) | |
download | libfuse-d6f8db71b84a139c1d74d6d0c654659951219c38.tar.gz |
kernel: Fix compilation on patched 2.6.18 (fc6) and 2.6.9
Diffstat (limited to 'kernel/control.c')
-rw-r--r-- | kernel/control.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/control.c b/kernel/control.c index 380630d..24e8fa4 100644 --- a/kernel/control.c +++ b/kernel/control.c @@ -12,6 +12,9 @@ #include <linux/module.h> #define FUSE_CTL_SUPER_MAGIC 0x65735543 +#ifndef HAVE_I_PRIVATE +#define i_private u.generic_ip +#endif /* * This is non-NULL when the single instance of the control filesystem @@ -23,7 +26,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->u.generic_ip; + fc = file->f_dentry->d_inode->i_private; if (fc) fc = fuse_conn_get(fc); mutex_unlock(&fuse_mutex); @@ -114,7 +117,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent, inode->i_op = iop; inode->i_fop = fop; inode->i_nlink = nlink; - inode->u.generic_ip = fc; + inode->i_private = fc; d_add(dentry, inode); return dentry; } @@ -132,7 +135,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc) return 0; parent = fuse_control_sb->s_root; - parent->d_inode->i_nlink++; + inc_nlink(parent->d_inode); sprintf(name, "%llu", (unsigned long long) fc->id); parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2, &simple_dir_inode_operations, @@ -166,7 +169,7 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc) for (i = fc->ctl_ndents - 1; i >= 0; i--) { struct dentry *dentry = fc->ctl_dentry[i]; - dentry->d_inode->u.generic_ip = NULL; + dentry->d_inode->i_private = NULL; d_drop(dentry); dput(dentry); } |