提交 48fe37cb 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  blk-cgroup: Fix an RCU warning in blkiocg_create()
  blk-cgroup: Fix RCU correctness warning in cfq_init_queue()
  drbd: don't expose failed local READ to upper layers
...@@ -286,16 +286,16 @@ static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup) ...@@ -286,16 +286,16 @@ static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup)
static struct cgroup_subsys_state * static struct cgroup_subsys_state *
blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup) blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)
{ {
struct blkio_cgroup *blkcg, *parent_blkcg; struct blkio_cgroup *blkcg;
struct cgroup *parent = cgroup->parent;
if (!cgroup->parent) { if (!parent) {
blkcg = &blkio_root_cgroup; blkcg = &blkio_root_cgroup;
goto done; goto done;
} }
/* Currently we do not support hierarchy deeper than two level (0,1) */ /* Currently we do not support hierarchy deeper than two level (0,1) */
parent_blkcg = cgroup_to_blkio_cgroup(cgroup->parent); if (parent != cgroup->top_cgroup)
if (css_depth(&parent_blkcg->css) > 0)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);
......
...@@ -3694,8 +3694,10 @@ static void *cfq_init_queue(struct request_queue *q) ...@@ -3694,8 +3694,10 @@ static void *cfq_init_queue(struct request_queue *q)
* to make sure that cfq_put_cfqg() does not try to kfree root group * to make sure that cfq_put_cfqg() does not try to kfree root group
*/ */
atomic_set(&cfqg->ref, 1); atomic_set(&cfqg->ref, 1);
rcu_read_lock();
blkiocg_add_blkio_group(&blkio_root_cgroup, &cfqg->blkg, (void *)cfqd, blkiocg_add_blkio_group(&blkio_root_cgroup, &cfqg->blkg, (void *)cfqd,
0); 0);
rcu_read_unlock();
#endif #endif
/* /*
* Not strictly needed (since RB_ROOT just clears the node and we * Not strictly needed (since RB_ROOT just clears the node and we
......
...@@ -235,7 +235,7 @@ void drbd_endio_pri(struct bio *bio, int error) ...@@ -235,7 +235,7 @@ void drbd_endio_pri(struct bio *bio, int error)
if (unlikely(error)) { if (unlikely(error)) {
what = (bio_data_dir(bio) == WRITE) what = (bio_data_dir(bio) == WRITE)
? write_completed_with_error ? write_completed_with_error
: (bio_rw(bio) == READA) : (bio_rw(bio) == READ)
? read_completed_with_error ? read_completed_with_error
: read_ahead_completed_with_error; : read_ahead_completed_with_error;
} else } else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册