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

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

diff --git a/queue-3.18/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch b/queue-3.18/dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch
new file mode 100644 (file)
index 0000000..6b2cd20
--- /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
+@@ -840,10 +840,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 ed06de622ed95fd0c47622e182b8855b4505a4b6..1adb741a07b1186a4e6184cc8b3695ebe9426a92 100644 (file)
@@ -96,3 +96,4 @@ xen-fix-gcc-warning-and-remove-duplicate-evtchn_row-evtchn_col-usage.patch
 smb2-fix-missing-files-in-root-share-directory-listing.patch
 crypto-mxs-dcp-fix-wait-logic-on-chan-threads.patch
 ocfs2-fix-locking-for-res-tracking-and-dlm-tracking_list.patch
+dm-thin-metadata-fix-__udivdi3-undefined-on-32-bit.patch