All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Anatoly Trosinenko <anatoly.trosinenko@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: FAT: Operating on broken FAT FS causes the write syscall to return negative number not equal to -1
Date: Sun, 15 Jul 2018 15:30:43 +0100	[thread overview]
Message-ID: <20180715143043.GM30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <878t6c7f8p.fsf@mail.parknet.co.jp>

On Sun, Jul 15, 2018 at 11:20:06PM +0900, OGAWA Hirofumi wrote:
> +static inline bool fat_valid_entry(struct msdos_sb_info *sbi, int entry)
> +{
> +	if (entry < FAT_START_ENT || sbi->max_cluster <= entry)
> +		return false;
> +	return true;
> +}

Pet peeve: if (...) return false; return true; instead of return !....;

In this case,
	return entry >= FAT_START_ENT && entry < sb->max_cluster;

  reply	other threads:[~2018-07-15 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 12:24 FAT: Operating on broken FAT FS causes the write syscall to return negative number not equal to -1 Anatoly Trosinenko
2018-07-15 14:20 ` OGAWA Hirofumi
2018-07-15 14:30   ` Al Viro [this message]
2018-07-15 15:08     ` [PATCH v2] " OGAWA Hirofumi
2018-07-15 15:08     ` Anatoly Trosinenko
2018-07-15 15:26       ` OGAWA Hirofumi
2018-07-15 15:35         ` Anatoly Trosinenko
2018-07-16 13:17       ` Alan Cox

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=20180715143043.GM30522@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=anatoly.trosinenko@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.