summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-2.6.32
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-12-17 20:34:26 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-12-17 20:34:26 +0000
commit96da72dc56b53577fa748f0359be14cb6485091a (patch)
tree93d559fce3dbf3b35f15ae8ec8506fbdcd69f236 /target/linux/generic/patches-2.6.32
parentcafe08a1b20d78525940e1686e0d6d425e560588 (diff)
downloadmtk-20170518-96da72dc56b53577fa748f0359be14cb6485091a.zip
mtk-20170518-96da72dc56b53577fa748f0359be14cb6485091a.tar.gz
mtk-20170518-96da72dc56b53577fa748f0359be14cb6485091a.tar.bz2
generic: fix min/max confusion in jffs2_sum_init on 2.6.32
SVN-Revision: 24652
Diffstat (limited to 'target/linux/generic/patches-2.6.32')
-rw-r--r--target/linux/generic/patches-2.6.32/009-jffs-fix-min-max-confusion.patch25
1 files changed, 25 insertions, 0 deletions
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 0000000..bc2734a
--- /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 <roel.kluin@gmail.com>
+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 <roel.kluin@gmail.com>
+Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+---
+ 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);
+