diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-03-16 03:34:37 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-03-20 13:30:13 +0400 |
commit | 04431c44e55613a91ced16c523f749c08dff91bf (patch) | |
tree | 565b9007485b1efbe6b477eefa4c70f91dfbab98 /fs/f2fs/file.c | |
parent | c3850aa1cb25872fddacd7abd8dfb021411e92ee (diff) | |
download | linux-04431c44e55613a91ced16c523f749c08dff91bf.tar.xz |
f2fs: fix not to allocate max_nid
The build_free_nid should not add free nids over nm_i->max_nid.
But, there was a hole that invalid free nid was added by the following scenario.
Let's suppose nm_i->max_nid = 150 and the last NAT page has 100 ~ 200 nids.
build_free_nids
- get_current_nat_page loads the last NAT page
- scan_nat_page can add 100 ~ 200 nids
-> Bug here!
So, when scanning an NAT page, we should check each candidate whether it is
over max_nid or not.
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/file.c')
0 files changed, 0 insertions, 0 deletions