From: "NODA, Kai" <nodakai@gmail.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-fsdevel@vger.kernel.org, "NODA, Kai" <nodakai@gmail.com>
Subject: [PATCH 1/1] fs/fat: fix ENOSPC condition of directory entries.
Date: Mon, 23 Dec 2013 13:55:29 +0800 [thread overview]
Message-ID: <1387778129-6028-1-git-send-email-nodakai@gmail.com> (raw)
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>
---
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)) {
--
1.7.9.5
next reply other threads:[~2013-12-23 5:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 5:55 NODA, Kai [this message]
2013-12-23 11:05 ` [PATCH 1/1] fs/fat: fix ENOSPC condition of directory entries OGAWA Hirofumi
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=1387778129-6028-1-git-send-email-nodakai@gmail.com \
--to=nodakai@gmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@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.