From: Greg Kroah-Hartman Date: Wed, 15 Sep 2021 11:24:32 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.14.5~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=255caf2890ede3a502afe7b6d23107fc0b210302;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: btrfs-wake-up-async_delalloc_pages-waiters-after-submit.patch rtc-tps65910-correct-driver-module-alias.patch --- diff --git a/queue-5.4/btrfs-wake-up-async_delalloc_pages-waiters-after-submit.patch b/queue-5.4/btrfs-wake-up-async_delalloc_pages-waiters-after-submit.patch new file mode 100644 index 00000000000..69d57e521b9 --- /dev/null +++ b/queue-5.4/btrfs-wake-up-async_delalloc_pages-waiters-after-submit.patch @@ -0,0 +1,54 @@ +From ac98141d140444fe93e26471d3074c603b70e2ca Mon Sep 17 00:00:00 2001 +From: Josef Bacik +Date: Wed, 14 Jul 2021 14:47:17 -0400 +Subject: btrfs: wake up async_delalloc_pages waiters after submit + +From: Josef Bacik + +commit ac98141d140444fe93e26471d3074c603b70e2ca upstream. + +We use the async_delalloc_pages mechanism to make sure that we've +completed our async work before trying to continue our delalloc +flushing. The reason for this is we need to see any ordered extents +that were created by our delalloc flushing. However we're waking up +before we do the submit work, which is before we create the ordered +extents. This is a pretty wide race window where we could potentially +think there are no ordered extents and thus exit shrink_delalloc +prematurely. Fix this by waking us up after we've done the work to +create ordered extents. + +CC: stable@vger.kernel.org # 5.4+ +Reviewed-by: Nikolay Borisov +Signed-off-by: Josef Bacik +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/inode.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/fs/btrfs/inode.c ++++ b/fs/btrfs/inode.c +@@ -1200,11 +1200,6 @@ static noinline void async_cow_submit(st + nr_pages = (async_chunk->end - async_chunk->start + PAGE_SIZE) >> + PAGE_SHIFT; + +- /* atomic_sub_return implies a barrier */ +- if (atomic_sub_return(nr_pages, &fs_info->async_delalloc_pages) < +- 5 * SZ_1M) +- cond_wake_up_nomb(&fs_info->async_submit_wait); +- + /* + * ->inode could be NULL if async_chunk_start has failed to compress, + * in which case we don't have anything to submit, yet we need to +@@ -1213,6 +1208,11 @@ static noinline void async_cow_submit(st + */ + if (async_chunk->inode) + submit_compressed_extents(async_chunk); ++ ++ /* atomic_sub_return implies a barrier */ ++ if (atomic_sub_return(nr_pages, &fs_info->async_delalloc_pages) < ++ 5 * SZ_1M) ++ cond_wake_up_nomb(&fs_info->async_submit_wait); + } + + static noinline void async_cow_free(struct btrfs_work *work) diff --git a/queue-5.4/rtc-tps65910-correct-driver-module-alias.patch b/queue-5.4/rtc-tps65910-correct-driver-module-alias.patch new file mode 100644 index 00000000000..3c048273268 --- /dev/null +++ b/queue-5.4/rtc-tps65910-correct-driver-module-alias.patch @@ -0,0 +1,33 @@ +From 8d448fa0a8bb1c8d94eef7647edffe9ac81a281e Mon Sep 17 00:00:00 2001 +From: Dmitry Osipenko +Date: Sun, 8 Aug 2021 19:00:30 +0300 +Subject: rtc: tps65910: Correct driver module alias + +From: Dmitry Osipenko + +commit 8d448fa0a8bb1c8d94eef7647edffe9ac81a281e upstream. + +The TPS65910 RTC driver module doesn't auto-load because of the wrong +module alias that doesn't match the device name, fix it. + +Cc: stable@vger.kernel.org +Reported-by: Anton Bambura +Tested-by: Anton Bambura +Signed-off-by: Dmitry Osipenko +Signed-off-by: Alexandre Belloni +Link: https://lore.kernel.org/r/20210808160030.8556-1-digetx@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/rtc/rtc-tps65910.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/rtc/rtc-tps65910.c ++++ b/drivers/rtc/rtc-tps65910.c +@@ -460,6 +460,6 @@ static struct platform_driver tps65910_r + }; + + module_platform_driver(tps65910_rtc_driver); +-MODULE_ALIAS("platform:rtc-tps65910"); ++MODULE_ALIAS("platform:tps65910-rtc"); + MODULE_AUTHOR("Venu Byravarasu "); + MODULE_LICENSE("GPL"); diff --git a/queue-5.4/series b/queue-5.4/series new file mode 100644 index 00000000000..5a4a8e6cc9e --- /dev/null +++ b/queue-5.4/series @@ -0,0 +1,2 @@ +rtc-tps65910-correct-driver-module-alias.patch +btrfs-wake-up-async_delalloc_pages-waiters-after-submit.patch