diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-18 00:12:23 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-03-18 00:12:23 +0100 |
commit | c595ceac1ad8c40aec85318e07424e5b6f338dad (patch) | |
tree | 5287bf7f046cf86ee07b421e0838891e8d17a3c6 /ext2fs | |
parent | 4f51b0e104481fb6d337140eeaa51af8c674d236 (diff) |
ext2fs: Fix off-by-one
* ext2fs/pager.c (disk_cache_init): Do not add
disk_cache_info[disk_cache_blocks] to disk_cache_info_free.
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/pager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext2fs/pager.c b/ext2fs/pager.c index d3954722..7d3a8f37 100644 --- a/ext2fs/pager.c +++ b/ext2fs/pager.c @@ -914,7 +914,7 @@ disk_cache_init (void) /* Initialize disk_cache_info. Start with the last entry so that the first ends up at the front of the free list. This keeps the assertions at the end of this function happy. */ - for (int i = disk_cache_blocks; i >= 0; i--) + for (int i = disk_cache_blocks - 1; i >= 0; i--) { disk_cache_info[i].block = DC_NO_BLOCK; disk_cache_info[i].flags = 0; |