[PATCH 18/23] idr: Convert xas_store() to xas_store_noinit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux