Browse Source

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: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Stefan Weinhuber 12 years ago
parent
commit
c81a90c853
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/s390/block/dasd.c

+ 2 - 1
drivers/s390/block/dasd.c

@@ -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);
 
 	/*