diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2011-05-19 15:38:21 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-05-20 14:34:52 -0400 |
commit | 3e59cf9d66a87763fef6c232a4a8dc664461ca50 (patch) | |
tree | 2a7a0618092f29ac72b3723e0e3e64a7e4227716 /block | |
parent | a23e68695593d00b35a6cddf8e9c9ec03505ecb9 (diff) |
cfq-iosched: Get rid of redundant function parameter "create"
Nobody seems to be using cfq_find_alloc_cfqg() function parameter "create".
Get rid of that.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ab7a9e6a9b1c..a905b5519ab6 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1015,7 +1015,7 @@ void cfq_update_blkio_group_weight(void *key, struct blkio_group *blkg, | |||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd, | 1017 | static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd, |
1018 | struct blkio_cgroup *blkcg, int create) | 1018 | struct blkio_cgroup *blkcg) |
1019 | { | 1019 | { |
1020 | struct cfq_group *cfqg = NULL; | 1020 | struct cfq_group *cfqg = NULL; |
1021 | void *key = cfqd; | 1021 | void *key = cfqd; |
@@ -1030,7 +1030,7 @@ static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd, | |||
1030 | cfqg->blkg.dev = MKDEV(major, minor); | 1030 | cfqg->blkg.dev = MKDEV(major, minor); |
1031 | goto done; | 1031 | goto done; |
1032 | } | 1032 | } |
1033 | if (cfqg || !create) | 1033 | if (cfqg) |
1034 | goto done; | 1034 | goto done; |
1035 | 1035 | ||
1036 | cfqg = kzalloc_node(sizeof(*cfqg), GFP_ATOMIC, cfqd->queue->node); | 1036 | cfqg = kzalloc_node(sizeof(*cfqg), GFP_ATOMIC, cfqd->queue->node); |
@@ -1073,18 +1073,18 @@ done: | |||
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | /* | 1075 | /* |
1076 | * Search for the cfq group current task belongs to. If create = 1, then also | 1076 | * Search for the cfq group current task belongs to. request_queue lock must |
1077 | * create the cfq group if it does not exist. request_queue lock must be held. | 1077 | * be held. |
1078 | */ | 1078 | */ |
1079 | static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create) | 1079 | static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd) |
1080 | { | 1080 | { |
1081 | struct blkio_cgroup *blkcg; | 1081 | struct blkio_cgroup *blkcg; |
1082 | struct cfq_group *cfqg = NULL; | 1082 | struct cfq_group *cfqg = NULL; |
1083 | 1083 | ||
1084 | rcu_read_lock(); | 1084 | rcu_read_lock(); |
1085 | blkcg = task_blkio_cgroup(current); | 1085 | blkcg = task_blkio_cgroup(current); |
1086 | cfqg = cfq_find_alloc_cfqg(cfqd, blkcg, create); | 1086 | cfqg = cfq_find_alloc_cfqg(cfqd, blkcg); |
1087 | if (!cfqg && create) | 1087 | if (!cfqg) |
1088 | cfqg = &cfqd->root_group; | 1088 | cfqg = &cfqd->root_group; |
1089 | rcu_read_unlock(); | 1089 | rcu_read_unlock(); |
1090 | return cfqg; | 1090 | return cfqg; |
@@ -1176,7 +1176,7 @@ void cfq_unlink_blkio_group(void *key, struct blkio_group *blkg) | |||
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | #else /* GROUP_IOSCHED */ | 1178 | #else /* GROUP_IOSCHED */ |
1179 | static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create) | 1179 | static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd) |
1180 | { | 1180 | { |
1181 | return &cfqd->root_group; | 1181 | return &cfqd->root_group; |
1182 | } | 1182 | } |
@@ -2911,7 +2911,7 @@ cfq_find_alloc_queue(struct cfq_data *cfqd, bool is_sync, | |||
2911 | struct cfq_group *cfqg; | 2911 | struct cfq_group *cfqg; |
2912 | 2912 | ||
2913 | retry: | 2913 | retry: |
2914 | cfqg = cfq_get_cfqg(cfqd, 1); | 2914 | cfqg = cfq_get_cfqg(cfqd); |
2915 | cic = cfq_cic_lookup(cfqd, ioc); | 2915 | cic = cfq_cic_lookup(cfqd, ioc); |
2916 | /* cic always exists here */ | 2916 | /* cic always exists here */ |
2917 | cfqq = cic_to_cfqq(cic, is_sync); | 2917 | cfqq = cic_to_cfqq(cic, is_sync); |