From: 심동호 <dh.sim@samsung.com>
To: linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mkfs: fix wrong extension count
Date: Wed, 26 Mar 2014 08:25:14 +0000 (GMT) [thread overview]
Message-ID: <20209889.99741395822314289.JavaMail.weblogic@epv6ml05> (raw)
fix an bug related to extension list.
there was the potential bug in set_cold_files function, namei.c.
Signed-off-by: Dongho Sim <dh.sim@samsung.com>
---
mkfs/f2fs_format.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 9dbdc1d..d485808 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -154,7 +154,7 @@ static void configure_extension_list(void)
memcpy(super_block.extension_list[i++], *extlist, name_len);
extlist++;
}
- super_block.extension_count = i - 1;
+ super_block.extension_count = i;
if (!ext_str)
return;
@@ -165,11 +165,11 @@ static void configure_extension_list(void)
name_len = strlen(ue);
memcpy(super_block.extension_list[i++], ue, name_len);
ue = strtok(NULL, ",");
- if (i > F2FS_MAX_EXTENSION)
+ if (i >= F2FS_MAX_EXTENSION)
break;
}
- super_block.extension_count = i - 1;
+ super_block.extension_count = i;
free(config.extension_list);
}
--
1.7.9.5
reply other threads:[~2014-03-26 8:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20209889.99741395822314289.JavaMail.weblogic@epv6ml05 \
--to=dh.sim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).