From 6a95a13b123566fdb3a7d59695438eeb880f9705 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Fri, 17 Dec 2010 20:34:26 +0000 Subject: generic: fix min/max confusion in jffs2_sum_init on 2.6.32 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24652 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../009-jffs-fix-min-max-confusion.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 target/linux/generic/patches-2.6.32/009-jffs-fix-min-max-confusion.patch diff --git a/target/linux/generic/patches-2.6.32/009-jffs-fix-min-max-confusion.patch b/target/linux/generic/patches-2.6.32/009-jffs-fix-min-max-confusion.patch new file mode 100644 index 0000000000..bc2734af0c --- /dev/null +++ b/target/linux/generic/patches-2.6.32/009-jffs-fix-min-max-confusion.patch @@ -0,0 +1,25 @@ +From 0fed784b0f1ecf57d568ae60b2cada43f9d90759 Mon Sep 17 00:00:00 2001 +From: Roel Kluin +Date: Sat, 21 Nov 2009 16:34:36 +0100 +Subject: [PATCH] JFFS2: fix min/max confusion + +MAX_SUMMARY_SIZE was meant as a limit, not as a minimum + +Signed-off-by: Roel Kluin +Signed-off-by: Artem Bityutskiy +Signed-off-by: David Woodhouse +--- + fs/jffs2/summary.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/fs/jffs2/summary.c ++++ b/fs/jffs2/summary.c +@@ -23,7 +23,7 @@ + + int jffs2_sum_init(struct jffs2_sb_info *c) + { +- uint32_t sum_size = max_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); ++ uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); + + c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL); + -- cgit v1.2.3