fuse: Get rid of bdi_initialized
[sfrench/cifs-2.6.git] / fs / fuse / dev.c
index b681b43c766e11daf45814fc694b4b988f218a43..c2d7f3a92679dd371af2a5fe9f9c2dfe1e0f39b2 100644 (file)
@@ -382,9 +382,9 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
                        wake_up(&fc->blocked_waitq);
 
                if (fc->num_background == fc->congestion_threshold &&
-                   fc->connected && fc->bdi_initialized) {
-                       clear_bdi_congested(&fc->bdi, BLK_RW_SYNC);
-                       clear_bdi_congested(&fc->bdi, BLK_RW_ASYNC);
+                   fc->connected && fc->sb) {
+                       clear_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC);
+                       clear_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC);
                }
                fc->num_background--;
                fc->active_background--;
@@ -573,10 +573,9 @@ void fuse_request_send_background_locked(struct fuse_conn *fc,
        fc->num_background++;
        if (fc->num_background == fc->max_background)
                fc->blocked = 1;
-       if (fc->num_background == fc->congestion_threshold &&
-           fc->bdi_initialized) {
-               set_bdi_congested(&fc->bdi, BLK_RW_SYNC);
-               set_bdi_congested(&fc->bdi, BLK_RW_ASYNC);
+       if (fc->num_background == fc->congestion_threshold && fc->sb) {
+               set_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC);
+               set_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC);
        }
        list_add_tail(&req->list, &fc->bg_queue);
        flush_bg_queue(fc);