Messages in this thread | | | Date | Thu, 16 Dec 2010 13:45:57 +0200 | From | Pekka Enberg <> | Subject | Re: [PATCH] cramfs: generate unique inode number for better inode cache usage |
| |
On 12/16/10 11:52 AM, stefani@seibold.net wrote: > +static unsigned long cramino(struct cramfs_inode * cino, unsigned int offset) > +{ > + if (!cino->offset) > + return offset + 1; > + if (!cino->size) > + return offset + 1; > + > + /* the mode test fix buggy mkcramfs implementations */
I'm getting into the bikeshedding territory but a less terse comment would be in order here, I think.
> + switch (cino->mode& S_IFMT) { > + case S_IFREG: > + case S_IFDIR: > + case S_IFLNK: > + return cino->offset<< 2; > + default: > + break; > + } > + return offset + 1; > +}
| |