Skip to content

Commit

Permalink
JFFS2: fix min/max confusion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Nov 30, 2009
1 parent 2695eab commit 0fed784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jffs2/summary.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 0fed784

Please sign in to comment.