aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-log.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
commit0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch)
tree41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /drivers/md/dm-log.c
parentaa877175e7a9982233ed8f10cb4bfddd78d82741 (diff)
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'drivers/md/dm-log.c')
-rw-r--r--drivers/md/dm-log.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index 4ca2d1df5b44..07fc1ad42ec5 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -291,9 +291,10 @@ static void header_from_disk(struct log_header_core *core, struct log_header_dis
291 core->nr_regions = le64_to_cpu(disk->nr_regions); 291 core->nr_regions = le64_to_cpu(disk->nr_regions);
292} 292}
293 293
294static int rw_header(struct log_c *lc, int rw) 294static int rw_header(struct log_c *lc, int op)
295{ 295{
296 lc->io_req.bi_op = rw; 296 lc->io_req.bi_op = op;
297 lc->io_req.bi_op_flags = 0;
297 298
298 return dm_io(&lc->io_req, 1, &lc->header_location, NULL); 299 return dm_io(&lc->io_req, 1, &lc->header_location, NULL);
299} 300}
@@ -316,7 +317,7 @@ static int read_header(struct log_c *log)
316{ 317{
317 int r; 318 int r;
318 319
319 r = rw_header(log, READ); 320 r = rw_header(log, REQ_OP_READ);
320 if (r) 321 if (r)
321 return r; 322 return r;
322 323
@@ -630,7 +631,7 @@ static int disk_resume(struct dm_dirty_log *log)
630 header_to_disk(&lc->header, lc->disk_header); 631 header_to_disk(&lc->header, lc->disk_header);
631 632
632 /* write the new header */ 633 /* write the new header */
633 r = rw_header(lc, WRITE); 634 r = rw_header(lc, REQ_OP_WRITE);
634 if (!r) { 635 if (!r) {
635 r = flush_header(lc); 636 r = flush_header(lc);
636 if (r) 637 if (r)
@@ -698,7 +699,7 @@ static int disk_flush(struct dm_dirty_log *log)
698 log_clear_bit(lc, lc->clean_bits, i); 699 log_clear_bit(lc, lc->clean_bits, i);
699 } 700 }
700 701
701 r = rw_header(lc, WRITE); 702 r = rw_header(lc, REQ_OP_WRITE);
702 if (r) 703 if (r)
703 fail_log_device(lc); 704 fail_log_device(lc);
704 else { 705 else {