diff options
| author | Miklos Szeredi <mszeredi@suse.cz> | 2012-08-30 13:24:34 -0400 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@suse.cz> | 2012-08-30 13:24:34 -0400 |
| commit | bbd99797973f2cebd905bf6469ce08b531ab258f (patch) | |
| tree | 7df386d3b784415f11f242f162499bb23ee5f5de | |
| parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) | |
cuse: fix fuse_conn_kill()
fuse_conn_kill() removed fc->entry, called fuse_ctl_remove_conn() and
fuse_bdi_destroy(). None of which is appropriate for cuse cleanup.
The fuse_ctl_remove_conn() decrements the nlink on the control filesystem, which
is totally bogus. The others are harmless but unnecessary.
So move these out from fuse_conn_kill() to fuse_put_super() where they belong.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| -rw-r--r-- | fs/fuse/inode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index ce0a2838ccd0..fca222dabe3c 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
| @@ -367,11 +367,6 @@ void fuse_conn_kill(struct fuse_conn *fc) | |||
| 367 | wake_up_all(&fc->waitq); | 367 | wake_up_all(&fc->waitq); |
| 368 | wake_up_all(&fc->blocked_waitq); | 368 | wake_up_all(&fc->blocked_waitq); |
| 369 | wake_up_all(&fc->reserved_req_waitq); | 369 | wake_up_all(&fc->reserved_req_waitq); |
| 370 | mutex_lock(&fuse_mutex); | ||
| 371 | list_del(&fc->entry); | ||
| 372 | fuse_ctl_remove_conn(fc); | ||
| 373 | mutex_unlock(&fuse_mutex); | ||
| 374 | fuse_bdi_destroy(fc); | ||
| 375 | } | 370 | } |
| 376 | EXPORT_SYMBOL_GPL(fuse_conn_kill); | 371 | EXPORT_SYMBOL_GPL(fuse_conn_kill); |
| 377 | 372 | ||
| @@ -380,7 +375,14 @@ static void fuse_put_super(struct super_block *sb) | |||
| 380 | struct fuse_conn *fc = get_fuse_conn_super(sb); | 375 | struct fuse_conn *fc = get_fuse_conn_super(sb); |
| 381 | 376 | ||
| 382 | fuse_send_destroy(fc); | 377 | fuse_send_destroy(fc); |
| 378 | |||
| 383 | fuse_conn_kill(fc); | 379 | fuse_conn_kill(fc); |
| 380 | mutex_lock(&fuse_mutex); | ||
| 381 | list_del(&fc->entry); | ||
| 382 | fuse_ctl_remove_conn(fc); | ||
| 383 | mutex_unlock(&fuse_mutex); | ||
| 384 | fuse_bdi_destroy(fc); | ||
| 385 | |||
| 384 | fuse_conn_put(fc); | 386 | fuse_conn_put(fc); |
| 385 | } | 387 | } |
| 386 | 388 | ||
