aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2007-10-16 16:11:01 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2007-10-16 16:11:01 +0000
commita32865d843466cb66724f211a813a844e380930e (patch)
treea30d4589ed02d1fed2e2a9e9bc762bcf6b564656 /kernel/inode.c
parent7d62647d7aebffe76837b0698e8dc22f439f1ab6 (diff)
downloadlibfuse-a32865d843466cb66724f211a813a844e380930e.tar.gz
pull kernel module fixes from mainline
Diffstat (limited to 'kernel/inode.c')
-rw-r--r--kernel/inode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/inode.c b/kernel/inode.c
index f52ee8b..8195f6e 100644
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -258,6 +258,7 @@ static void fuse_put_super(struct super_block *sb)
kill_fasync(&fc->fasync, SIGIO, POLL_IN);
wake_up_all(&fc->waitq);
wake_up_all(&fc->blocked_waitq);
+ wake_up_all(&fc->reserved_req_waitq);
mutex_lock(&fuse_mutex);
list_del(&fc->entry);
fuse_ctl_remove_conn(fc);
@@ -293,6 +294,11 @@ static int fuse_statfs(struct super_block *sb, struct kstatfs *buf)
struct fuse_statfs_out outarg;
int err;
+ if (!fuse_allow_task(fc, current)) {
+ buf->f_type = FUSE_SUPER_MAGIC;
+ return 0;
+ }
+
req = fuse_get_req(fc);
if (IS_ERR(req))
return PTR_ERR(req);
@@ -469,6 +475,7 @@ static struct fuse_conn *new_conn(void)
atomic_set(&fc->count, 1);
init_waitqueue_head(&fc->waitq);
init_waitqueue_head(&fc->blocked_waitq);
+ init_waitqueue_head(&fc->reserved_req_waitq);
INIT_LIST_HEAD(&fc->pending);
INIT_LIST_HEAD(&fc->processing);
INIT_LIST_HEAD(&fc->io);
@@ -506,6 +513,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
attr.mode = mode;
attr.ino = FUSE_ROOT_ID;
+ attr.nlink = 1;
return fuse_iget(sb, 1, 0, &attr);
}
#ifndef FUSE_MAINLINE