- 论坛徽章:
- 0
|
/*
* We only want one ->make_request_fn to be active at a time,
* else stack usage with stacked devices could be a problem.
* So use current->bio_list to keep a list of requests
* submited by a make_request_fn function.
* current->bio_list is also used as a flag to say if
* generic_make_request is currently active in this task or not.
* If it is NULL, then no make_request is active. If it is non-NULL,
* then a make_request is active, and new requests should be added
* at the tail
*/
void generic_make_request(struct bio *bio)
{
...
if (current->bio_list) {
/* make_request is active */
bio_list_add(current->bio_list, bio);
return;
}
...
}
虽然generic_make_request表明only want one make_request_fn 处于激活状态,但是我没找到这个是怎么保证的。
但是current->bio_list是一个全局的变量,为什么直接bio_list_add都没有加锁呢?
|
|