Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251151
b: refs/heads/master
c: 3e59cf9
h: refs/heads/master
i:
  251149: ae6b455
  251147: 1d71823
  251143: 6c2daa9
  251135: c235490
v: v3
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed May 20, 2011
1 parent 3fd0b82 commit 4a8cdeb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a23e68695593d00b35a6cddf8e9c9ec03505ecb9
refs/heads/master: 3e59cf9d66a87763fef6c232a4a8dc664461ca50
18 changes: 9 additions & 9 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void cfq_update_blkio_group_weight(void *key, struct blkio_group *blkg,
}

static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd,
struct blkio_cgroup *blkcg, int create)
struct blkio_cgroup *blkcg)
{
struct cfq_group *cfqg = NULL;
void *key = cfqd;
Expand All @@ -1030,7 +1030,7 @@ static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd,
cfqg->blkg.dev = MKDEV(major, minor);
goto done;
}
if (cfqg || !create)
if (cfqg)
goto done;

cfqg = kzalloc_node(sizeof(*cfqg), GFP_ATOMIC, cfqd->queue->node);
Expand Down Expand Up @@ -1073,18 +1073,18 @@ static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd,
}

/*
* Search for the cfq group current task belongs to. If create = 1, then also
* create the cfq group if it does not exist. request_queue lock must be held.
* Search for the cfq group current task belongs to. request_queue lock must
* be held.
*/
static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create)
static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd)
{
struct blkio_cgroup *blkcg;
struct cfq_group *cfqg = NULL;

rcu_read_lock();
blkcg = task_blkio_cgroup(current);
cfqg = cfq_find_alloc_cfqg(cfqd, blkcg, create);
if (!cfqg && create)
cfqg = cfq_find_alloc_cfqg(cfqd, blkcg);
if (!cfqg)
cfqg = &cfqd->root_group;
rcu_read_unlock();
return cfqg;
Expand Down Expand Up @@ -1176,7 +1176,7 @@ void cfq_unlink_blkio_group(void *key, struct blkio_group *blkg)
}

#else /* GROUP_IOSCHED */
static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create)
static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd)
{
return &cfqd->root_group;
}
Expand Down Expand Up @@ -2911,7 +2911,7 @@ cfq_find_alloc_queue(struct cfq_data *cfqd, bool is_sync,
struct cfq_group *cfqg;

retry:
cfqg = cfq_get_cfqg(cfqd, 1);
cfqg = cfq_get_cfqg(cfqd);
cic = cfq_cic_lookup(cfqd, ioc);
/* cic always exists here */
cfqq = cic_to_cfqq(cic, is_sync);
Expand Down

0 comments on commit 4a8cdeb

Please sign in to comment.