]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix an off-by-one BUG_ON() statement
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Dec 2014 23:41:37 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:03 +0000 (17:41 -0800)
commitd94d99864c1f53523f9155c2f8bf0056a3fc62ba
tree9be49e211258e1d6eb874f55f357f710406b9ba4
parentfc6ba7aed02b64a786422bcea2b3ec227fc012ea
ocfs2: fix an off-by-one BUG_ON() statement

The ->si_slots[] array is allocated in ocfs2_init_slot_info() it has
"->max_slots" number of elements so this test should be >= instead of >.

Static checker work.  Compile tested only.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/slot_map.c