aboutsummaryrefslogtreecommitdiff
path: root/kernel/inode.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2001-10-31 14:52:35 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2001-10-31 14:52:35 +0000
commit5e183482b09cec20f54ccb44e767a7fab51833e9 (patch)
treecfadb38331eb258eb129d28627f5f999fa3c5e99 /kernel/inode.c
parent19dff1ba9dfe6f474d22224267a7407c949d6803 (diff)
x
Diffstat (limited to 'kernel/inode.c')
-rw-r--r--kernel/inode.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/kernel/inode.c b/kernel/inode.c
index 702ef57..ed4f760 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -39,7 +39,7 @@ static int alloc_cleared(struct fuse_conn *fc)
unsigned long *tmp;
spin_unlock(&fuse_lock);
- tmp = kmalloc(sizeof(unsigned long) * MAX_CLEARED, GFP_KERNEL);
+ tmp = kmalloc(sizeof(unsigned long) * MAX_CLEARED, GFP_NOFS);
spin_lock(&fuse_lock);
if(!fc->file || fc->cleared != NULL)
@@ -72,7 +72,7 @@ static unsigned long *add_cleared(struct fuse_conn *fc, unsigned long ino)
static void fuse_clear_inode(struct inode *inode)
{
- struct fuse_conn *fc = inode->i_sb->u.generic_sbp;
+ struct fuse_conn *fc = INO_FC(inode);
unsigned long *forget;
spin_lock(&fuse_lock);
@@ -139,17 +139,11 @@ static struct fuse_conn *get_conn(struct fuse_mount_data *d)
static struct inode *get_root_inode(struct super_block *sb)
{
- struct inode *root;
-
- root = iget(sb, 1);
- if(root) {
- struct fuse_attr attr;
- memset(&attr, 0, sizeof(attr));
- attr.mode = S_IFDIR;
- fuse_init_inode(root, &attr);
- }
+ struct fuse_attr attr;
+ memset(&attr, 0, sizeof(attr));
- return root;
+ attr.mode = S_IFDIR;
+ return fuse_iget(sb, 1, &attr);
}
static struct super_block *fuse_read_super(struct super_block *sb,