public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@kernel.org>
To: stefani@seibold.net
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] cramfs: generate unique inode number for better inode cache usage
Date: Thu, 16 Dec 2010 13:45:57 +0200	[thread overview]
Message-ID: <4D09FBF5.8050401@kernel.org> (raw)
In-Reply-To: <1292493142-4840-1-git-send-email-stefani@seibold.net>

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;
> +}


  reply	other threads:[~2010-12-16 11:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16  9:52 [PATCH] cramfs: generate unique inode number for better inode cache usage stefani
2010-12-16 11:45 ` Pekka Enberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-16 16:40 stefani
2010-12-14 23:12 stefani
2010-12-14 23:32 ` Linus Torvalds
2010-12-14 23:43   ` Linus Torvalds
2010-12-15  7:50     ` Stefani Seibold
2010-12-15  8:15       ` Pekka Enberg
2010-12-15 15:51         ` Linus Torvalds
2010-12-15 16:31           ` stefani
2010-12-15 16:45             ` Linus Torvalds
2010-12-16  9:47               ` Stefani Seibold
2010-12-12 10:48 stefani
2010-12-14 20:51 ` Andrew Morton
2010-12-14 21:02   ` Stefani Seibold
2010-12-14 21:12     ` Andrew Morton
2010-12-14 21:27       ` Stefani Seibold
2010-12-14 21:08   ` Linus Torvalds
2010-12-14 21:24     ` Stefani Seibold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D09FBF5.8050401@kernel.org \
    --to=penberg@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefani@seibold.net \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox