Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.com>2017-06-07 17:10:18 +0200
committerMichal Marek <mmarek@suse.com>2017-06-07 17:12:06 +0200
commit4502c760ba4a5a735e348760903459e16e55bca3 (patch)
tree040d78c1405749629c64c657817c5e8b290396fc
parent945d239f784012b419e11ffcca968b15875d6dca (diff)
Btrfs: warn if total_bytes_pinned is non-zero on unmountrpm-4.4.70-2
(bsc#1040182).
-rw-r--r--patches.suse/0007-Btrfs-warn-if-total_bytes_pinned-is-non-zero-on-unmo.patch30
-rw-r--r--series.conf1
2 files changed, 31 insertions, 0 deletions
diff --git a/patches.suse/0007-Btrfs-warn-if-total_bytes_pinned-is-non-zero-on-unmo.patch b/patches.suse/0007-Btrfs-warn-if-total_bytes_pinned-is-non-zero-on-unmo.patch
new file mode 100644
index 0000000000..58753449b5
--- /dev/null
+++ b/patches.suse/0007-Btrfs-warn-if-total_bytes_pinned-is-non-zero-on-unmo.patch
@@ -0,0 +1,30 @@
+From 2a457791a60f63a79c8e01c04c927a3275b44af4 Mon Sep 17 00:00:00 2001
+From: Omar Sandoval <osandov@fb.com>
+Date: Tue, 6 Jun 2017 16:45:32 -0700
+Subject: [PATCH 7/7] Btrfs: warn if total_bytes_pinned is non-zero on unmount
+References: bsc#1040182
+Patch-mainline: Submitted, https://www.spinics.net/lists/linux-btrfs/msg66259.html
+
+Catch any future/remaining leaks or underflows of total_bytes_pinned.
+
+Signed-off-by: Omar Sandoval <osandov@fb.com>
+Acked-by: NIkolay Borisov <nborisov@suse.com>
+---
+ fs/btrfs/extent-tree.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
+index cf11d90ceb3c..2a165dcbf5c0 100644
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -9843,6 +9843,7 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
+ space_info->bytes_reserved > 0 ||
+ space_info->bytes_may_use > 0))
+ dump_space_info(info, space_info, 0, 0);
++ WARN_ON(percpu_counter_sum(&space_info->total_bytes_pinned) != 0);
+ list_del(&space_info->list);
+ for (i = 0; i < BTRFS_NR_RAID_TYPES; i++) {
+ struct kobject *kobj;
+--
+2.7.4
+
diff --git a/series.conf b/series.conf
index d1f6d60301..c2821e3d93 100644
--- a/series.conf
+++ b/series.conf
@@ -3804,6 +3804,7 @@
patches.suse/0004-Btrfs-always-account-pinned-bytes-when-dropping-a-tr.patch
patches.suse/0005-Btrfs-return-old-and-new-total-ref-mods-when-adding-.patch
patches.suse/0006-Btrfs-rework-delayed-ref-total_bytes_pinned-accounti.patch
+ patches.suse/0007-Btrfs-warn-if-total_bytes_pinned-is-non-zero-on-unmo.patch
# SUSE-specific
patches.suse/btrfs-provide-super_operations-get_inode_dev