fuse: Get rid of bdi_initialized
[sfrench/cifs-2.6.git] / fs / fuse / dev.c
index 78887f68ee6a6ecd22d42afb4df0d2b2251fb22f..c2d7f3a92679dd371af2a5fe9f9c2dfe1e0f39b2 100644 (file)
@@ -382,7 +382,7 @@ 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) {
+                   fc->connected && fc->sb) {
                        clear_bdi_congested(fc->sb->s_bdi, BLK_RW_SYNC);
                        clear_bdi_congested(fc->sb->s_bdi, BLK_RW_ASYNC);
                }
@@ -573,8 +573,7 @@ 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) {
+       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);
        }