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

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

diff --git a/queue-4.14/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch b/queue-4.14/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch
new file mode 100644 (file)
index 0000000..85ffa82
--- /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
+@@ -841,10 +841,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 3a8bd4dfa3af24c5f4d44ce6f4e6debf802b9feb..32738b8f1668749e29a34afa9320eca3950d3982 100644 (file)
@@ -91,3 +91,4 @@ tools-hv-fcopy-set-error-in-case-an-unknown-operation-was-requested.patch
 proc-restrict-kernel-stack-dumps-to-root.patch
 ocfs2-fix-locking-for-res-tracking-and-dlm-tracking_list.patch
 ixgbe-check-return-value-of-napi_complete_done.patch
+dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch