From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: "NODA\, Kai" <nodakai@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/1] fs/fat: fix ENOSPC condition of directory entries.
Date: Mon, 23 Dec 2013 20:05:37 +0900 [thread overview]
Message-ID: <87d2knn7y6.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1387778129-6028-1-git-send-email-nodakai@gmail.com> (Kai NODA's message of "Mon, 23 Dec 2013 13:55:29 +0800")
"NODA, Kai" <nodakai@gmail.com> writes:
> From: "NODA, Kai" <nodakai@gmail.com>
>
> FAT_MAX_DIR_ENTRIES entries in a normal directory should be permitted as
> per the FAT spec. Previously the max number of entries was
> FAT_MAX_DIR_ENTRIES - 1 due to the bug.
>
> Signed-off-by: NODA, Kai <nodakai@gmail.com>
Looks good.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks.
> ---
> fs/fat/dir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index 3963ede..cf9be44 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -1288,7 +1288,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
> err = -ENOSPC;
> while (fat_get_entry(dir, &pos, &bh, &de) > -1) {
> /* check the maximum size of directory */
> - if (pos >= FAT_MAX_DIR_SIZE)
> + if (pos > FAT_MAX_DIR_SIZE)
> goto error;
>
> if (IS_FREE(de->name)) {
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2013-12-23 11:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 5:55 [PATCH 1/1] fs/fat: fix ENOSPC condition of directory entries NODA, Kai
2013-12-23 11:05 ` OGAWA Hirofumi [this message]
2013-12-23 13:06 ` OGAWA Hirofumi
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=87d2knn7y6.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=nodakai@gmail.com \
/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.