diff options
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 4ee8f72e6380..fc4203570370 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -379,6 +379,7 @@ static struct fuse_conn *new_conn(void) | |||
379 | fc = kzalloc(sizeof(*fc), GFP_KERNEL); | 379 | fc = kzalloc(sizeof(*fc), GFP_KERNEL); |
380 | if (fc) { | 380 | if (fc) { |
381 | spin_lock_init(&fc->lock); | 381 | spin_lock_init(&fc->lock); |
382 | mutex_init(&fc->inst_mutex); | ||
382 | atomic_set(&fc->count, 1); | 383 | atomic_set(&fc->count, 1); |
383 | init_waitqueue_head(&fc->waitq); | 384 | init_waitqueue_head(&fc->waitq); |
384 | init_waitqueue_head(&fc->blocked_waitq); | 385 | init_waitqueue_head(&fc->blocked_waitq); |
@@ -398,8 +399,10 @@ static struct fuse_conn *new_conn(void) | |||
398 | 399 | ||
399 | void fuse_conn_put(struct fuse_conn *fc) | 400 | void fuse_conn_put(struct fuse_conn *fc) |
400 | { | 401 | { |
401 | if (atomic_dec_and_test(&fc->count)) | 402 | if (atomic_dec_and_test(&fc->count)) { |
403 | mutex_destroy(&fc->inst_mutex); | ||
402 | kfree(fc); | 404 | kfree(fc); |
405 | } | ||
403 | } | 406 | } |
404 | 407 | ||
405 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) | 408 | struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) |