JFFS2: fix min/max confusion
authorRoel Kluin <roel.kluin@gmail.com>
Sat, 21 Nov 2009 15:34:36 +0000 (16:34 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 09:59:48 +0000 (09:59 +0000)
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

index 6caf1e1ee26d33951e2d013c4710ed3b21c9d3e2..800171dca53b2b24c00ce803686e38e72f6a931c 100644 (file)
@@ -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);