Skip to content

Commit

Permalink
s390/dasd: Write to profile data area only if it is available
Browse files Browse the repository at this point in the history
We check for the existence of block->profile.data before we write to
it, but the dependent code block misses braces.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Stefan Weinhuber authored and Martin Schwidefsky committed Oct 28, 2013
1 parent 302bfe2 commit c81a90c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,11 @@ static void dasd_profile_start(struct dasd_block *block,
}

spin_lock(&block->profile.lock);
if (block->profile.data)
if (block->profile.data) {
block->profile.data->dasd_io_nr_req[counter]++;
if (rq_data_dir(req) == READ)
block->profile.data->dasd_read_nr_req[counter]++;
}
spin_unlock(&block->profile.lock);

/*
Expand Down

0 comments on commit c81a90c

Please sign in to comment.