Bug in fs/kernfs/dir.c comment or code?

From: Richard Cochran
Date: Sun Mar 02 2014 - 15:17:51 EST


I stumbled across this in fs/kernfs/dir.c:39.

/* Reserve hash numbers 0, 1 and INT_MAX for magic directory entries */
if (hash < 1)
hash += 2;
if (hash >= INT_MAX)
hash = INT_MAX - 1;

Shouldn't that be (hash < 2), or is 1 not reserved?

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/