]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH 1/2] proc: fix inode number bogorithmetic
authorAlexey Dobriyan <adobriyan@gmail.com>
Sat, 26 Jul 2008 07:18:28 +0000 (11:18 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Aug 2008 15:25:27 +0000 (11:25 -0400)
commit22810966dac7825aa7587570b87ecd059d5f55f5
treef1f50d7e854982b302bc4be7da6bb820032b6294
parent2cdb90a1a881d0b77e85f9609d286c6b64793bac
[PATCH 1/2] proc: fix inode number bogorithmetic

Id which proc gets from IDR for inode number and id which proc removes
from IDR do not match. E.g. 0x11a transforms into 0x8000011a.

Which stayed unnoticed for a long time because, surprise, idr_remove()
masks out that high bit before doing anything.

All of this due to "| ~MAX_ID_MASK" in release_inode_number().

I still don't understand how it's supposed to work, because "| ~MASK"
is not an inversion for "& MAX" operation.

So, use just one nice, working addition. Make start offset unsigned int,
while I'm at it. It's longness is not used anywhere.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/proc/generic.c