ANDROID: dm-bow: backport to 4.14
authorPaul Lawrence <paullawrence@google.com>
Fri, 22 Mar 2019 15:25:28 +0000 (08:25 -0700)
committerPaul Lawrence <paullawrence@google.com>
Mon, 25 Mar 2019 20:57:48 +0000 (13:57 -0700)
Change-Id: Ib89b91adaa11b84744de9167bda57ff0056f4415
Signed-off-by: Paul Lawrence <paullawrence@google.com>
drivers/md/dm-bow.c

index 0d176aa140dfb86a5e89c9499609271ad11e37e1..fa0675d58853bdb9826337fb8ec59c7c53088005 100644 (file)
@@ -5,13 +5,14 @@
  */
 
 #include "dm.h"
+#include "dm-bufio.h"
 #include "dm-core.h"
 
 #include <linux/crc32.h>
-#include <linux/dm-bufio.h>
 #include <linux/module.h>
 
 #define DM_MSG_PREFIX "bow"
+#define SECTOR_SIZE 512
 
 struct log_entry {
        u64 source;
@@ -925,7 +926,7 @@ static int handle_sector0(struct bow_context *bc, struct bio *bio)
                struct bio * split = bio_split(bio,
                                               bc->block_size >> SECTOR_SHIFT,
                                               GFP_NOIO,
-                                              &fs_bio_set);
+                                              fs_bio_set);
                if (!split) {
                        DMERR("Failed to split bio");
                        bio->bi_status = BLK_STS_RESOURCE;
@@ -1176,7 +1177,8 @@ static void dm_bow_status(struct dm_target *ti, status_type_t type,
        }
 }
 
-int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
+int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev,
+                        fmode_t *mode)
 {
        struct bow_context *bc = ti->private;
        struct dm_dev *dev = bc->dev;