提交 c81a90c8 编写于 作者: S Stefan Weinhuber 提交者: Martin Schwidefsky

s390/dasd: Write to profile data area only if it is available

We check for the existence of block->profile.data before we write to
it, but the dependent code block misses braces.
Signed-off-by: NStefan Weinhuber <wein@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 302bfe20
...@@ -698,10 +698,11 @@ static void dasd_profile_start(struct dasd_block *block, ...@@ -698,10 +698,11 @@ static void dasd_profile_start(struct dasd_block *block,
} }
spin_lock(&block->profile.lock); spin_lock(&block->profile.lock);
if (block->profile.data) if (block->profile.data) {
block->profile.data->dasd_io_nr_req[counter]++; block->profile.data->dasd_io_nr_req[counter]++;
if (rq_data_dir(req) == READ) if (rq_data_dir(req) == READ)
block->profile.data->dasd_read_nr_req[counter]++; block->profile.data->dasd_read_nr_req[counter]++;
}
spin_unlock(&block->profile.lock); spin_unlock(&block->profile.lock);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册