diff options
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 04c80cc957a3..ceee75df7b32 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -200,9 +200,6 @@ static void fuse_put_super(struct super_block *sb) | |||
200 | 200 | ||
201 | spin_lock(&fuse_lock); | 201 | spin_lock(&fuse_lock); |
202 | fc->mounted = 0; | 202 | fc->mounted = 0; |
203 | fc->user_id = 0; | ||
204 | fc->group_id = 0; | ||
205 | fc->flags = 0; | ||
206 | /* Flush all readers on this fs */ | 203 | /* Flush all readers on this fs */ |
207 | wake_up_all(&fc->waitq); | 204 | wake_up_all(&fc->waitq); |
208 | up_write(&fc->sbput_sem); | 205 | up_write(&fc->sbput_sem); |
@@ -379,16 +376,15 @@ static struct fuse_conn *new_conn(void) | |||
379 | { | 376 | { |
380 | struct fuse_conn *fc; | 377 | struct fuse_conn *fc; |
381 | 378 | ||
382 | fc = kmalloc(sizeof(*fc), GFP_KERNEL); | 379 | fc = kzalloc(sizeof(*fc), GFP_KERNEL); |
383 | if (fc != NULL) { | 380 | if (fc != NULL) { |
384 | int i; | 381 | int i; |
385 | memset(fc, 0, sizeof(*fc)); | ||
386 | init_waitqueue_head(&fc->waitq); | 382 | init_waitqueue_head(&fc->waitq); |
387 | INIT_LIST_HEAD(&fc->pending); | 383 | INIT_LIST_HEAD(&fc->pending); |
388 | INIT_LIST_HEAD(&fc->processing); | 384 | INIT_LIST_HEAD(&fc->processing); |
389 | INIT_LIST_HEAD(&fc->unused_list); | 385 | INIT_LIST_HEAD(&fc->unused_list); |
390 | INIT_LIST_HEAD(&fc->background); | 386 | INIT_LIST_HEAD(&fc->background); |
391 | sema_init(&fc->outstanding_sem, 0); | 387 | sema_init(&fc->outstanding_sem, 1); /* One for INIT */ |
392 | init_rwsem(&fc->sbput_sem); | 388 | init_rwsem(&fc->sbput_sem); |
393 | for (i = 0; i < FUSE_MAX_OUTSTANDING; i++) { | 389 | for (i = 0; i < FUSE_MAX_OUTSTANDING; i++) { |
394 | struct fuse_req *req = fuse_request_alloc(); | 390 | struct fuse_req *req = fuse_request_alloc(); |
@@ -420,7 +416,7 @@ static struct fuse_conn *get_conn(struct file *file, struct super_block *sb) | |||
420 | fc = ERR_PTR(-EINVAL); | 416 | fc = ERR_PTR(-EINVAL); |
421 | } else { | 417 | } else { |
422 | file->private_data = fc; | 418 | file->private_data = fc; |
423 | *get_fuse_conn_super_p(sb) = fc; | 419 | sb->s_fs_info = fc; |
424 | fc->mounted = 1; | 420 | fc->mounted = 1; |
425 | fc->connected = 1; | 421 | fc->connected = 1; |
426 | fc->count = 2; | 422 | fc->count = 2; |