]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Oct 2018 09:31:16 +0000 (11:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Oct 2018 09:31:16 +0000 (11:31 +0200)
added patches:
dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch

queue-4.18/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch [new file with mode: 0644]
queue-4.18/series

diff --git a/queue-4.18/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch b/queue-4.18/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch
new file mode 100644 (file)
index 0000000..89dbded
--- /dev/null
@@ -0,0 +1,36 @@
+From 013ad043906b2befd4a9bfb06219ed9fedd92716 Mon Sep 17 00:00:00 2001
+From: Mike Snitzer <snitzer@redhat.com>
+Date: Thu, 13 Sep 2018 21:16:20 -0400
+Subject: dm thin metadata: fix __udivdi3 undefined on 32-bit
+
+From: Mike Snitzer <snitzer@redhat.com>
+
+commit 013ad043906b2befd4a9bfb06219ed9fedd92716 upstream.
+
+sector_div() is only viable for use with sector_t.
+dm_block_t is typedef'd to uint64_t -- so use div_u64() instead.
+
+Fixes: 3ab918281 ("dm thin metadata: try to avoid ever aborting transactions")
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-thin-metadata.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/md/dm-thin-metadata.c
++++ b/drivers/md/dm-thin-metadata.c
+@@ -832,10 +832,8 @@ static void __set_metadata_reserve(struc
+       if (r) {
+               DMERR("could not get size of metadata device");
+               pmd->metadata_reserve = max_blocks;
+-      } else {
+-              sector_div(total, 10);
+-              pmd->metadata_reserve = min(max_blocks, total);
+-      }
++      } else
++              pmd->metadata_reserve = min(max_blocks, div_u64(total, 10));
+ }
+ struct dm_pool_metadata *dm_pool_metadata_open(struct block_device *bdev,
index 54161696ae978815ee46ae67e33b4608607ad77f..01e7cf121f3ddbfe4bd4149c76b6d124ecc7579e 100644 (file)
@@ -165,3 +165,4 @@ proc-restrict-kernel-stack-dumps-to-root.patch
 ocfs2-fix-locking-for-res-tracking-and-dlm-tracking_list.patch
 hid-i2c-hid-disable-runtime-pm-operations-on-hantick-touchpad.patch
 ixgbe-check-return-value-of-napi_complete_done.patch
+dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch