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

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

diff --git a/queue-4.9/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch b/queue-4.9/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch
new file mode 100644 (file)
index 0000000..cdec3d2
--- /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
+@@ -843,10 +843,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 1a9565a7c75c13f16d01a8f4348e7850280f5c68..79e5c8e7e710105b7669d06d4e6dc7e47be49c33 100644 (file)
@@ -56,3 +56,4 @@ crypto-mxs-dcp-fix-wait-logic-on-chan-threads.patch
 gpiolib-free-the-last-requested-descriptor.patch
 proc-restrict-kernel-stack-dumps-to-root.patch
 ocfs2-fix-locking-for-res-tracking-and-dlm-tracking_list.patch
+dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch