Re: [PATCH] cramfs: generate unique inode number for better inodecache usage
From: Linus Torvalds
Date: Wed Dec 15 2010 - 10:52:21 EST
On Wed, Dec 15, 2010 at 12:15 AM, Pekka Enberg <penberg@xxxxxxxxxx> wrote:
>
> I think Linus is after something like this:
That works for me, but I hate the double "switch()" statement checking
the same thing.
Why is the camino() function not just doing something like
static unsigned int cramino(struct cramfs_inode *ino, unsigned int
dirent_offset)
{
unsigned int data_offset = ino->offset;
return data_offset ? data_offset << 2 : dirent_offset+1;
}
and we can get rid of all the cruddy CRAMINO_UNIQ() and testing of the
mode entirely for that path.
That, together with Pekka's approach seems nice, simple and clean.
Linus
--
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/