[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4D09FBF5.8050401@kernel.org>
Date: Thu, 16 Dec 2010 13:45:57 +0200
From: Pekka Enberg <penberg@...nel.org>
To: stefani@...bold.net
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Al Viro <viro@...iv.linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] cramfs: generate unique inode number for better inode
cache usage
On 12/16/10 11:52 AM, stefani@...bold.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;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists