From cceda4499f79a0d4a68d84046ec68580bf74c72b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 18 Oct 2022 19:36:02 +0200 Subject: [PATCH] drop btrfs-separate-out-the-eb-and-extent-state-leak-help.patch --- ...ut-the-eb-and-extent-state-leak-help.patch | 144 ------------------ queue-5.15/series | 1 - ...ut-the-eb-and-extent-state-leak-help.patch | 144 ------------------ queue-5.19/series | 1 - ...ut-the-eb-and-extent-state-leak-help.patch | 144 ------------------ queue-6.0/series | 1 - 6 files changed, 435 deletions(-) delete mode 100644 queue-5.15/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch delete mode 100644 queue-5.19/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch delete mode 100644 queue-6.0/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch diff --git a/queue-5.15/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch b/queue-5.15/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch deleted file mode 100644 index 4d482db0f74..00000000000 --- a/queue-5.15/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 4166032c305d5875eff9fd43b703db64df3ce3d2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 9 Sep 2022 17:53:19 -0400 -Subject: btrfs: separate out the eb and extent state leak helpers - -From: Josef Bacik - -[ Upstream commit a40246e8afc0af3ffdee21854fb755c9364b8346 ] - -Currently we have the add/del functions generic so that we can use them -for both extent buffers and extent states. We want to separate this -code however, so separate these helpers into per-object helpers in -anticipation of the split. - -Signed-off-by: Josef Bacik -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Sasha Levin ---- - fs/btrfs/extent_io.c | 58 +++++++++++++++++++++++++++++--------------- - 1 file changed, 38 insertions(+), 20 deletions(-) - -diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c -index 7bd704779a99..eef6e38915ab 100644 ---- a/fs/btrfs/extent_io.c -+++ b/fs/btrfs/extent_io.c -@@ -43,25 +43,42 @@ static inline bool extent_state_in_tree(const struct extent_state *state) - static LIST_HEAD(states); - static DEFINE_SPINLOCK(leak_lock); - --static inline void btrfs_leak_debug_add(spinlock_t *lock, -- struct list_head *new, -- struct list_head *head) -+static inline void btrfs_leak_debug_add_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_add(&eb->leak_list, &fs_info->allocated_ebs); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_add_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_add(new, head); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_add(&state->leak_list, &states); -+ spin_unlock_irqrestore(&leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_del_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_del(&eb->leak_list); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); - } - --static inline void btrfs_leak_debug_del(spinlock_t *lock, -- struct list_head *entry) -+static inline void btrfs_leak_debug_del_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_del(entry); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_del(&state->leak_list); -+ spin_unlock_irqrestore(&leak_lock, flags); - } - - void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) -@@ -124,9 +141,11 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, - } - } - #else --#define btrfs_leak_debug_add(lock, new, head) do {} while (0) --#define btrfs_leak_debug_del(lock, entry) do {} while (0) --#define btrfs_extent_state_leak_debug_check() do {} while (0) -+#define btrfs_leak_debug_add_eb(eb) do {} while (0) -+#define btrfs_leak_debug_add_state(state) do {} while (0) -+#define btrfs_leak_debug_del_eb(eb) do {} while (0) -+#define btrfs_leak_debug_del_state(state) do {} while (0) -+#define btrfs_extent_state_leak_debug_check() do {} while (0) - #define btrfs_debug_check_extent_io_range(c, s, e) do {} while (0) - #endif - -@@ -343,7 +362,7 @@ static struct extent_state *alloc_extent_state(gfp_t mask) - state->state = 0; - state->failrec = NULL; - RB_CLEAR_NODE(&state->rb_node); -- btrfs_leak_debug_add(&leak_lock, &state->leak_list, &states); -+ btrfs_leak_debug_add_state(state); - refcount_set(&state->refs, 1); - init_waitqueue_head(&state->wq); - trace_alloc_extent_state(state, mask, _RET_IP_); -@@ -356,7 +375,7 @@ void free_extent_state(struct extent_state *state) - return; - if (refcount_dec_and_test(&state->refs)) { - WARN_ON(extent_state_in_tree(state)); -- btrfs_leak_debug_del(&leak_lock, &state->leak_list); -+ btrfs_leak_debug_del_state(state); - trace_free_extent_state(state, _RET_IP_); - kmem_cache_free(extent_state_cache, state); - } -@@ -5830,7 +5849,7 @@ static void btrfs_release_extent_buffer_pages(struct extent_buffer *eb) - static inline void btrfs_release_extent_buffer(struct extent_buffer *eb) - { - btrfs_release_extent_buffer_pages(eb); -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - __free_extent_buffer(eb); - } - -@@ -5847,8 +5866,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, - eb->bflags = 0; - init_rwsem(&eb->lock); - -- btrfs_leak_debug_add(&fs_info->eb_leak_lock, &eb->leak_list, -- &fs_info->allocated_ebs); -+ btrfs_leak_debug_add_eb(eb); - INIT_LIST_HEAD(&eb->release_list); - - spin_lock_init(&eb->refs_lock); -@@ -6294,7 +6312,7 @@ static int release_extent_buffer(struct extent_buffer *eb) - spin_unlock(&eb->refs_lock); - } - -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - /* Should be safe to release our pages at this point */ - btrfs_release_extent_buffer_pages(eb); - #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS --- -2.35.1 - diff --git a/queue-5.15/series b/queue-5.15/series index 051880e3274..b1c7d376284 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -542,7 +542,6 @@ btrfs-scrub-try-to-fix-super-block-errors.patch btrfs-don-t-print-information-about-space-cache-or-t.patch btrfs-check-superblock-to-ensure-the-fs-was-not-modi.patch btrfs-add-kcsan-annotations-for-unlocked-access-to-b.patch -btrfs-separate-out-the-eb-and-extent-state-leak-help.patch arm64-dts-uniphier-add-usb-device-support-for-pxs3-r.patch arm-9242-1-kasan-only-map-modules-if-config_kasan_vm.patch selftests-cpu-hotplug-use-return-instead-of-exit.patch diff --git a/queue-5.19/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch b/queue-5.19/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch deleted file mode 100644 index 6dd89d35c2b..00000000000 --- a/queue-5.19/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch +++ /dev/null @@ -1,144 +0,0 @@ -From cedca0827f5d311bddf414ed15cd8e54e13a6fe0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 9 Sep 2022 17:53:19 -0400 -Subject: btrfs: separate out the eb and extent state leak helpers - -From: Josef Bacik - -[ Upstream commit a40246e8afc0af3ffdee21854fb755c9364b8346 ] - -Currently we have the add/del functions generic so that we can use them -for both extent buffers and extent states. We want to separate this -code however, so separate these helpers into per-object helpers in -anticipation of the split. - -Signed-off-by: Josef Bacik -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Sasha Levin ---- - fs/btrfs/extent_io.c | 58 +++++++++++++++++++++++++++++--------------- - 1 file changed, 38 insertions(+), 20 deletions(-) - -diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c -index 5785ed241f6f..8c83d00fcb8c 100644 ---- a/fs/btrfs/extent_io.c -+++ b/fs/btrfs/extent_io.c -@@ -44,25 +44,42 @@ static inline bool extent_state_in_tree(const struct extent_state *state) - static LIST_HEAD(states); - static DEFINE_SPINLOCK(leak_lock); - --static inline void btrfs_leak_debug_add(spinlock_t *lock, -- struct list_head *new, -- struct list_head *head) -+static inline void btrfs_leak_debug_add_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_add(&eb->leak_list, &fs_info->allocated_ebs); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_add_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_add(new, head); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_add(&state->leak_list, &states); -+ spin_unlock_irqrestore(&leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_del_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_del(&eb->leak_list); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); - } - --static inline void btrfs_leak_debug_del(spinlock_t *lock, -- struct list_head *entry) -+static inline void btrfs_leak_debug_del_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_del(entry); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_del(&state->leak_list); -+ spin_unlock_irqrestore(&leak_lock, flags); - } - - void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) -@@ -126,9 +143,11 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, - } - } - #else --#define btrfs_leak_debug_add(lock, new, head) do {} while (0) --#define btrfs_leak_debug_del(lock, entry) do {} while (0) --#define btrfs_extent_state_leak_debug_check() do {} while (0) -+#define btrfs_leak_debug_add_eb(eb) do {} while (0) -+#define btrfs_leak_debug_add_state(state) do {} while (0) -+#define btrfs_leak_debug_del_eb(eb) do {} while (0) -+#define btrfs_leak_debug_del_state(state) do {} while (0) -+#define btrfs_extent_state_leak_debug_check() do {} while (0) - #define btrfs_debug_check_extent_io_range(c, s, e) do {} while (0) - #endif - -@@ -357,7 +376,7 @@ static struct extent_state *alloc_extent_state(gfp_t mask) - state->state = 0; - state->failrec = NULL; - RB_CLEAR_NODE(&state->rb_node); -- btrfs_leak_debug_add(&leak_lock, &state->leak_list, &states); -+ btrfs_leak_debug_add_state(state); - refcount_set(&state->refs, 1); - init_waitqueue_head(&state->wq); - trace_alloc_extent_state(state, mask, _RET_IP_); -@@ -370,7 +389,7 @@ void free_extent_state(struct extent_state *state) - return; - if (refcount_dec_and_test(&state->refs)) { - WARN_ON(extent_state_in_tree(state)); -- btrfs_leak_debug_del(&leak_lock, &state->leak_list); -+ btrfs_leak_debug_del_state(state); - trace_free_extent_state(state, _RET_IP_); - kmem_cache_free(extent_state_cache, state); - } -@@ -5919,7 +5938,7 @@ static void btrfs_release_extent_buffer_pages(struct extent_buffer *eb) - static inline void btrfs_release_extent_buffer(struct extent_buffer *eb) - { - btrfs_release_extent_buffer_pages(eb); -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - __free_extent_buffer(eb); - } - -@@ -5936,8 +5955,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, - eb->bflags = 0; - init_rwsem(&eb->lock); - -- btrfs_leak_debug_add(&fs_info->eb_leak_lock, &eb->leak_list, -- &fs_info->allocated_ebs); -+ btrfs_leak_debug_add_eb(eb); - INIT_LIST_HEAD(&eb->release_list); - - spin_lock_init(&eb->refs_lock); -@@ -6405,7 +6423,7 @@ static int release_extent_buffer(struct extent_buffer *eb) - spin_unlock(&eb->refs_lock); - } - -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - /* Should be safe to release our pages at this point */ - btrfs_release_extent_buffer_pages(eb); - #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS --- -2.35.1 - diff --git a/queue-5.19/series b/queue-5.19/series index 5229183a39a..a7b8a992239 100644 --- a/queue-5.19/series +++ b/queue-5.19/series @@ -734,7 +734,6 @@ btrfs-don-t-print-information-about-space-cache-or-t.patch btrfs-call-__btrfs_remove_free_space_cache_locked-on.patch btrfs-check-superblock-to-ensure-the-fs-was-not-modi.patch btrfs-add-kcsan-annotations-for-unlocked-access-to-b.patch -btrfs-separate-out-the-eb-and-extent-state-leak-help.patch arm64-dts-uniphier-add-usb-device-support-for-pxs3-r.patch arm-9233-1-stacktrace-skip-frame-pointer-boundary-ch.patch arm-9234-1-stacktrace-avoid-duplicate-saving-of-exce.patch diff --git a/queue-6.0/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch b/queue-6.0/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch deleted file mode 100644 index ee58fb23ff5..00000000000 --- a/queue-6.0/btrfs-separate-out-the-eb-and-extent-state-leak-help.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 72845648c29a262b9cfbbe0e1ac678db0bc6166d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 9 Sep 2022 17:53:19 -0400 -Subject: btrfs: separate out the eb and extent state leak helpers - -From: Josef Bacik - -[ Upstream commit a40246e8afc0af3ffdee21854fb755c9364b8346 ] - -Currently we have the add/del functions generic so that we can use them -for both extent buffers and extent states. We want to separate this -code however, so separate these helpers into per-object helpers in -anticipation of the split. - -Signed-off-by: Josef Bacik -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Sasha Levin ---- - fs/btrfs/extent_io.c | 58 +++++++++++++++++++++++++++++--------------- - 1 file changed, 38 insertions(+), 20 deletions(-) - -diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c -index cf4f19e80e2f..d9d254b59bd1 100644 ---- a/fs/btrfs/extent_io.c -+++ b/fs/btrfs/extent_io.c -@@ -44,25 +44,42 @@ static inline bool extent_state_in_tree(const struct extent_state *state) - static LIST_HEAD(states); - static DEFINE_SPINLOCK(leak_lock); - --static inline void btrfs_leak_debug_add(spinlock_t *lock, -- struct list_head *new, -- struct list_head *head) -+static inline void btrfs_leak_debug_add_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_add(&eb->leak_list, &fs_info->allocated_ebs); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_add_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_add(new, head); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_add(&state->leak_list, &states); -+ spin_unlock_irqrestore(&leak_lock, flags); -+} -+ -+static inline void btrfs_leak_debug_del_eb(struct extent_buffer *eb) -+{ -+ struct btrfs_fs_info *fs_info = eb->fs_info; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&fs_info->eb_leak_lock, flags); -+ list_del(&eb->leak_list); -+ spin_unlock_irqrestore(&fs_info->eb_leak_lock, flags); - } - --static inline void btrfs_leak_debug_del(spinlock_t *lock, -- struct list_head *entry) -+static inline void btrfs_leak_debug_del_state(struct extent_state *state) - { - unsigned long flags; - -- spin_lock_irqsave(lock, flags); -- list_del(entry); -- spin_unlock_irqrestore(lock, flags); -+ spin_lock_irqsave(&leak_lock, flags); -+ list_del(&state->leak_list); -+ spin_unlock_irqrestore(&leak_lock, flags); - } - - void btrfs_extent_buffer_leak_debug_check(struct btrfs_fs_info *fs_info) -@@ -126,9 +143,11 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, - } - } - #else --#define btrfs_leak_debug_add(lock, new, head) do {} while (0) --#define btrfs_leak_debug_del(lock, entry) do {} while (0) --#define btrfs_extent_state_leak_debug_check() do {} while (0) -+#define btrfs_leak_debug_add_eb(eb) do {} while (0) -+#define btrfs_leak_debug_add_state(state) do {} while (0) -+#define btrfs_leak_debug_del_eb(eb) do {} while (0) -+#define btrfs_leak_debug_del_state(state) do {} while (0) -+#define btrfs_extent_state_leak_debug_check() do {} while (0) - #define btrfs_debug_check_extent_io_range(c, s, e) do {} while (0) - #endif - -@@ -353,7 +372,7 @@ static struct extent_state *alloc_extent_state(gfp_t mask) - state->state = 0; - state->failrec = NULL; - RB_CLEAR_NODE(&state->rb_node); -- btrfs_leak_debug_add(&leak_lock, &state->leak_list, &states); -+ btrfs_leak_debug_add_state(state); - refcount_set(&state->refs, 1); - init_waitqueue_head(&state->wq); - trace_alloc_extent_state(state, mask, _RET_IP_); -@@ -366,7 +385,7 @@ void free_extent_state(struct extent_state *state) - return; - if (refcount_dec_and_test(&state->refs)) { - WARN_ON(extent_state_in_tree(state)); -- btrfs_leak_debug_del(&leak_lock, &state->leak_list); -+ btrfs_leak_debug_del_state(state); - trace_free_extent_state(state, _RET_IP_); - kmem_cache_free(extent_state_cache, state); - } -@@ -5856,7 +5875,7 @@ static void btrfs_release_extent_buffer_pages(struct extent_buffer *eb) - static inline void btrfs_release_extent_buffer(struct extent_buffer *eb) - { - btrfs_release_extent_buffer_pages(eb); -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - __free_extent_buffer(eb); - } - -@@ -5873,8 +5892,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, - eb->bflags = 0; - init_rwsem(&eb->lock); - -- btrfs_leak_debug_add(&fs_info->eb_leak_lock, &eb->leak_list, -- &fs_info->allocated_ebs); -+ btrfs_leak_debug_add_eb(eb); - INIT_LIST_HEAD(&eb->release_list); - - spin_lock_init(&eb->refs_lock); -@@ -6342,7 +6360,7 @@ static int release_extent_buffer(struct extent_buffer *eb) - spin_unlock(&eb->refs_lock); - } - -- btrfs_leak_debug_del(&eb->fs_info->eb_leak_lock, &eb->leak_list); -+ btrfs_leak_debug_del_eb(eb); - /* Should be safe to release our pages at this point */ - btrfs_release_extent_buffer_pages(eb); - #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS --- -2.35.1 - diff --git a/queue-6.0/series b/queue-6.0/series index d26f31b5aaa..c3f66700315 100644 --- a/queue-6.0/series +++ b/queue-6.0/series @@ -822,7 +822,6 @@ btrfs-don-t-print-information-about-space-cache-or-t.patch btrfs-call-__btrfs_remove_free_space_cache_locked-on.patch btrfs-check-superblock-to-ensure-the-fs-was-not-modi.patch btrfs-add-kcsan-annotations-for-unlocked-access-to-b.patch -btrfs-separate-out-the-eb-and-extent-state-leak-help.patch arm64-dts-uniphier-add-usb-device-support-for-pxs3-r.patch arm-9233-1-stacktrace-skip-frame-pointer-boundary-ch.patch arm-9234-1-stacktrace-avoid-duplicate-saving-of-exce.patch -- 2.47.2