[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200422150256.23473-19-jack@suse.cz>
Date: Wed, 22 Apr 2020 17:02:51 +0200
From: Jan Kara <jack@...e.cz>
To: Matthew Wilcox <willy@...radead.org>
Cc: <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, Jan Kara <jack@...e.cz>
Subject: [PATCH 18/23] idr: Convert xas_store() to xas_store_noinit()
All remaining users of xas_store() store non-NULL entries so xas_store()
and xas_store_noinit() are equivalent. Replace xas_store() with
xas_store_noinit().
Signed-off-by: Jan Kara <jack@...e.cz>
---
lib/idr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/idr.c b/lib/idr.c
index 4ee06bc7208a..afd171077901 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -408,7 +408,7 @@ int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max,
goto nospc;
if (bit < BITS_PER_XA_VALUE) {
tmp |= 1UL << bit;
- xas_store(&xas, xa_mk_value(tmp));
+ xas_store_noinit(&xas, xa_mk_value(tmp));
goto out;
}
}
@@ -418,7 +418,7 @@ int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max,
if (!bitmap)
goto alloc;
bitmap->bitmap[0] = tmp;
- xas_store(&xas, bitmap);
+ xas_store_noinit(&xas, bitmap);
if (xas_error(&xas)) {
bitmap->bitmap[0] = 0;
goto out;
@@ -446,7 +446,7 @@ int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max,
goto alloc;
__set_bit(bit, bitmap->bitmap);
}
- xas_store(&xas, bitmap);
+ xas_store_noinit(&xas, bitmap);
}
out:
xas_unlock_irqrestore(&xas, flags);
@@ -502,7 +502,7 @@ void ida_free(struct ida *ida, unsigned int id)
v &= ~(1UL << bit);
if (!v)
goto delete;
- xas_store(&xas, xa_mk_value(v));
+ xas_store_noinit(&xas, xa_mk_value(v));
} else {
if (!test_bit(bit, bitmap->bitmap))
goto err;
--
2.16.4
Powered by blists - more mailing lists