libvtreefs: allow highly dynamic directories

Change-Id: Ibf76262f943ef1a5f529384ebd4a06a2cc5897c1
This commit is contained in:
Cristiano Giuffrida 2015-01-01 16:34:13 +01:00 committed by David van Moolenbroek
parent c21aa858e2
commit 64d15bd98e

View file

@ -432,7 +432,10 @@ get_inode_by_index(const struct inode * parent, index_t index)
CHECK_INODE(parent);
assert(S_ISDIR(parent->i_stat.mode));
assert(index >= 0 && index < parent->i_indexed);
assert(index >= 0);
if (index >= parent->i_indexed)
return NULL;
/* Get the hash value, and search for the inode. */
slot = parent_index_hash(parent, index);