Backports Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2] patches: update lib-bucket_locks.patch for v4.18-rc1
@ 2018-09-10 10:02 Winnie Chang
  2018-09-10 10:19 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Winnie Chang @ 2018-09-10 10:02 UTC (permalink / raw)
  To: backports; +Cc: Chi-Hsien.Lin

This patch do not apply to source code in v4.18-rc1 due to
commit ce91f6ee5b3b (mm: kvmalloc does not fallback to vmalloc for
incompatible gfp flags) so updating it.

Signed-off-by: Winnie Chang <winnie.chang@cypress.com>
---
 patches/lib-bucket_locks.patch | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/patches/lib-bucket_locks.patch b/patches/lib-bucket_locks.patch
index 15eeda1..7a97ce3 100644
--- a/patches/lib-bucket_locks.patch
+++ b/patches/lib-bucket_locks.patch
@@ -1,8 +1,6 @@
-diff --git a/compat/lib-bucket_locks.c b/compat/lib-bucket_locks.c
-index 266a97c5708b..405b52ca5708 100644
 --- a/compat/lib-bucket_locks.c
 +++ b/compat/lib-bucket_locks.c
-@@ -30,10 +30,24 @@ int alloc_bucket_spinlocks(spinlock_t **
+@@ -31,7 +31,26 @@
  	}
  
  	if (sizeof(spinlock_t) != 0) {
@@ -18,12 +16,14 @@ index 266a97c5708b..405b52ca5708 100644
 +		if (!tlocks)
 +			tlocks = kmalloc_array(size, sizeof(spinlock_t),
 +						   gfp);
++#elif LINUX_VERSION_IS_LESS(4,18,0)
++		if (gfpflags_allow_blocking(gfp))
++ 			tlocks = kvmalloc(size * sizeof(spinlock_t), gfp);
++ 		else
++ 			tlocks = kmalloc_array(size, sizeof(spinlock_t), gfp);
 +#else
- 		if (gfpflags_allow_blocking(gfp))
- 			tlocks = kvmalloc(size * sizeof(spinlock_t), gfp);
- 		else
- 			tlocks = kmalloc_array(size, sizeof(spinlock_t), gfp);
+ 		tlocks = kvmalloc_array(size, sizeof(spinlock_t), gfp);
 +#endif
  		if (!tlocks)
  			return -ENOMEM;
- 		for (i = 0; i < size; i++)
+ 		for (i = 0; i < size; i++) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] patches: update lib-bucket_locks.patch for v4.18-rc1
  2018-09-10 10:02 [PATCH v2] patches: update lib-bucket_locks.patch for v4.18-rc1 Winnie Chang
@ 2018-09-10 10:19 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2018-09-10 10:19 UTC (permalink / raw)
  To: Winnie Chang, backports; +Cc: Chi-Hsien.Lin

On Mon, 2018-09-10 at 05:02 -0500, Winnie Chang wrote:
> This patch do not apply to source code in v4.18-rc1 due to
> commit ce91f6ee5b3b (mm: kvmalloc does not fallback to vmalloc for
> incompatible gfp flags) so updating it.

I just applied Felix's removal of this, so this should no longer be
necessary.

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 10:02 [PATCH v2] patches: update lib-bucket_locks.patch for v4.18-rc1 Winnie Chang
2018-09-10 10:19 ` Johannes Berg

Backports Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/backports/0 backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ https://lore.kernel.org/backports \
		backports@vger.kernel.org backports@archiver.kernel.org
	public-inbox-index backports


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.backports


AGPL code for this site: git clone https://public-inbox.org/ public-inbox