diff options
Diffstat (limited to 'block/blk-cgroup.c')
| -rw-r--r-- | block/blk-cgroup.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 24ed26957367..55a7dc227dfb 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -54,7 +54,7 @@ static struct blkcg_policy *blkcg_policy[BLKCG_MAX_POLS]; | |||
| 54 | 54 | ||
| 55 | static LIST_HEAD(all_blkcgs); /* protected by blkcg_pol_mutex */ | 55 | static LIST_HEAD(all_blkcgs); /* protected by blkcg_pol_mutex */ |
| 56 | 56 | ||
| 57 | static bool blkcg_debug_stats = false; | 57 | bool blkcg_debug_stats = false; |
| 58 | static struct workqueue_struct *blkcg_punt_bio_wq; | 58 | static struct workqueue_struct *blkcg_punt_bio_wq; |
| 59 | 59 | ||
| 60 | static bool blkcg_policy_enabled(struct request_queue *q, | 60 | static bool blkcg_policy_enabled(struct request_queue *q, |
| @@ -944,10 +944,7 @@ static int blkcg_print_stat(struct seq_file *sf, void *v) | |||
| 944 | dbytes, dios); | 944 | dbytes, dios); |
| 945 | } | 945 | } |
| 946 | 946 | ||
| 947 | if (!blkcg_debug_stats) | 947 | if (blkcg_debug_stats && atomic_read(&blkg->use_delay)) { |
| 948 | goto next; | ||
| 949 | |||
| 950 | if (atomic_read(&blkg->use_delay)) { | ||
| 951 | has_stats = true; | 948 | has_stats = true; |
| 952 | off += scnprintf(buf+off, size-off, | 949 | off += scnprintf(buf+off, size-off, |
| 953 | " use_delay=%d delay_nsec=%llu", | 950 | " use_delay=%d delay_nsec=%llu", |
| @@ -967,7 +964,7 @@ static int blkcg_print_stat(struct seq_file *sf, void *v) | |||
| 967 | has_stats = true; | 964 | has_stats = true; |
| 968 | off += written; | 965 | off += written; |
| 969 | } | 966 | } |
| 970 | next: | 967 | |
| 971 | if (has_stats) { | 968 | if (has_stats) { |
| 972 | if (off < size - 1) { | 969 | if (off < size - 1) { |
| 973 | off += scnprintf(buf+off, size-off, "\n"); | 970 | off += scnprintf(buf+off, size-off, "\n"); |
