public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	 Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Alice Ryhl <aliceryhl@google.com>,
	Andreas Hindborg <a.hindborg@kernel.org>,
	 Tamir Duberstein <tamird@gmail.com>
Subject: [PATCH 0/2] xarray: extract __xa_cmpxchg_raw
Date: Tue, 12 Nov 2024 14:25:35 -0500	[thread overview]
Message-ID: <20241112-xarray-insert-cmpxchg-v1-0-dc2bdd8c4136@gmail.com> (raw)

This series reduces duplication between __xa_cmpxchg and __xa_insert by
extracting a new function that does not coerce zero entries to null on
the return path.

The new function may be used by the upcoming Rust xarray abstraction in
its reservation API where it is useful to tell the difference between
zero entries and null slots.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Tamir Duberstein (2):
      xarray: extract xa_zero_to_null
      xarray: extract helper from __xa_{insert,cmpxchg}

 lib/xarray.c | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)
---
base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
change-id: 20241023-xarray-insert-cmpxchg-507661adac1c

Best regards,
-- 
Tamir Duberstein <tamird@gmail.com>


             reply	other threads:[~2024-11-12 19:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 19:25 Tamir Duberstein [this message]
2024-11-12 19:25 ` [PATCH 1/2] xarray: extract xa_zero_to_null Tamir Duberstein
2024-11-12 19:25 ` [PATCH 2/2] xarray: extract helper from __xa_{insert,cmpxchg} Tamir Duberstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241112-xarray-insert-cmpxchg-v1-0-dc2bdd8c4136@gmail.com \
    --to=tamird@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aliceryhl@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox