summaryrefslogtreecommitdiff
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-14 10:54:52 +0900
committerMiklos Szeredi <mszeredi@suse.cz>2009-04-28 16:56:41 +0200
commita325f9b92273d6c64ec56167905b951b9827ec33 (patch)
tree05c80627acf609f12c8117c254c3e1feb2ec5689 /fs/fuse/dev.c
parent797759aaf31351a1ab1b9130c4f180ce496f46c5 (diff)
fuse: update fuse_conn_init() and separate out fuse_conn_kill()
Update fuse_conn_init() such that it doesn't take @sb and move bdi registration into a separate function. Also separate out fuse_conn_kill() from fuse_put_super(). These will be used to implement cuse. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index ba76b68c52ff..368189fd4056 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -282,7 +282,7 @@ __releases(&fc->lock)
wake_up_all(&fc->blocked_waitq);
}
if (fc->num_background == FUSE_CONGESTION_THRESHOLD &&
- fc->connected) {
+ fc->connected && fc->bdi_initialized) {
clear_bdi_congested(&fc->bdi, READ);
clear_bdi_congested(&fc->bdi, WRITE);
}
@@ -408,7 +408,8 @@ static void fuse_request_send_nowait_locked(struct fuse_conn *fc,
fc->num_background++;
if (fc->num_background == FUSE_MAX_BACKGROUND)
fc->blocked = 1;
- if (fc->num_background == FUSE_CONGESTION_THRESHOLD) {
+ if (fc->num_background == FUSE_CONGESTION_THRESHOLD &&
+ fc->bdi_initialized) {
set_bdi_congested(&fc->bdi, READ);
set_bdi_congested(&fc->bdi, WRITE);
}