]> git.baikalelectronics.ru Git - kernel.git/commit
minixfs: fix block limit check
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 30 Jul 2012 21:42:00 +0000 (14:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 31 Jul 2012 00:25:19 +0000 (17:25 -0700)
commitbc72e0536f03e0d13216628f2b73eef8c2404c3d
treee4abd14e4d767d37010df501e0941fd826590522
parentf8c7f3b3e9c6cf148d93ff68175d3b9def868fcf
minixfs: fix block limit check

On minix2 and minix3 usually max_size is 7fffffff and the check in
question prohibits creation of last block spanning right before 7fffffff,
due to downward rounding during the division.  Fix it by using
multiplication instead.

[akpm@linux-foundation.org: fix up code layout, use local `sb']
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/minix/itree_v2.c