Filipe Manana 5dfe2be7ea Btrfs: fix off-by-one logic error in btrfs_realloc_node
The end_slot variable actually matches the number of pointers in the
node and not the last slot (which is 'nritems - 1'). Therefore in order
to check that the current slot in the for loop doesn't match the last
one, the correct logic is to check if 'i' is less than 'end_slot - 1'
and not 'end_slot - 2'.

Fix this and set end_slot to be 'nritems - 1', as it's less confusing
since the variable name implies it's inclusive rather then exclusive.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
2015-03-02 14:04:45 -08:00
..
2014-11-19 13:01:20 -05:00
2014-11-19 13:01:20 -05:00
2014-12-13 12:42:51 -08:00
2014-08-08 15:57:24 -07:00
2014-11-19 13:01:20 -05:00
2014-11-19 13:01:20 -05:00
2014-12-14 16:10:09 -08:00
2015-01-06 10:45:35 +01:00
2014-12-18 19:08:10 -08:00
2014-08-07 14:40:09 -04:00
2014-11-28 18:23:44 -08:00
2015-01-09 15:51:08 -08:00
2014-01-25 03:14:05 -05:00
2014-11-19 13:01:20 -05:00
2014-12-14 16:10:09 -08:00
2014-12-21 22:42:37 +01:00
2014-12-12 09:48:17 -08:00
2014-08-07 14:40:09 -04:00
2014-11-19 13:01:20 -05:00
2014-12-08 20:39:29 -05:00
2014-10-24 00:14:38 +02:00
2014-12-10 21:31:59 -05:00
2014-12-18 11:22:02 -08:00
2014-05-06 17:39:42 -04:00
2014-04-01 23:19:08 -04:00
2014-08-26 09:35:56 +02:00
2013-11-09 00:16:31 -05:00
2014-11-10 10:06:18 +01:00
2014-11-19 13:01:25 -05:00
2014-11-19 13:01:26 -05:00