Akinobu Mita 69b195be51 bfs: fix bitmap size argument to find_first_zero_bit()
The usage of find_first_zero_bit() in bfs_create() is wrong for two
reasons.

The bitmap size argument to find_first_zero_bit() is info->si_lasti but
the correct bitmap size is info->si_lasti + 1 as info->si_lasti is the
last valid index in info->si_imap bitmap.

Another problem is that it is impossible to detect that info->si_imap
bitmap is full because there is an off-by-one bug in the return value
check for find_first_zero_bit().  If no zero bits exist in info->si_imap,
find_first_zero_bit() returns info->si_lasti.  But the check can't catch
it due to the off-by-one.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-03-21 08:35:12 -04:00
..
2011-03-02 00:02:38 +01:00
2011-03-17 14:02:57 +01:00
2011-02-25 11:12:37 -08:00
2011-02-21 22:31:47 +00:00
2011-03-17 14:02:57 +01:00
2011-03-10 13:22:34 -06:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:17 -05:00
2011-01-07 17:50:26 +11:00
2011-01-14 09:23:36 -08:00
2011-01-12 20:03:42 -05:00
2011-03-02 22:27:36 +01:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:16 -05:00
2011-03-17 14:02:57 +01:00
2011-03-21 00:45:50 -04:00
2011-03-01 15:47:58 +01:00
2011-03-17 14:02:57 +01:00
2011-01-07 17:50:26 +11:00
2011-03-16 09:41:17 +11:00
2011-03-21 00:45:38 -04:00
2011-01-07 17:50:26 +11:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:16 -05:00
2011-01-13 08:03:12 -08:00
2010-10-29 04:16:28 -04:00
2011-03-21 00:16:09 -04:00
2011-03-15 02:21:44 -04:00
2011-01-07 17:50:27 +11:00
2011-03-21 00:16:08 -04:00
2011-01-13 17:32:32 -08:00
2011-03-21 01:10:41 -04:00
2011-01-07 17:50:33 +11:00
2011-03-14 09:15:28 -04:00