* [PATCH] mkfs: fix wrong extension count
@ 2014-03-26 8:25 심동호
0 siblings, 0 replies; only message in thread
From: 심동호 @ 2014-03-26 8:25 UTC (permalink / raw)
To: linux-f2fs-devel, linux-fsdevel, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1159 bytes --]
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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-26 8:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-26 8:25 [PATCH] mkfs: fix wrong extension count 심동호
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome