[PATCH 5/9] XArray: entry in last level is not expected to be a node

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

 



If an entry is at the last level, whose parent's shift is 0, it is not
expected to be a node. We can just leverage the xa_is_node() check to
break the loop instead of check shift additionally.

Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
---
 lib/xarray.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/xarray.c b/lib/xarray.c
index e08a0388a156..0c5b44def3aa 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -238,8 +238,6 @@ void *xas_load(struct xa_state *xas)
 		if (xas->xa_shift > node->shift)
 			break;
 		entry = xas_descend(xas, node);
-		if (node->shift == 0)
-			break;
 	}
 	return entry;
 }
-- 
2.23.0




[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