diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-01 17:38:26 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-01 17:38:26 +0900 |
commit | 3bb5e2c8fe2296ddd9d864dcfb5ee1b77135f3ec (patch) | |
tree | 72c7494d7dc9a958ec262c5137c95b3e42ac7ee3 /fs/f2fs | |
parent | 808a1d7490671a74ffa077cf92779c7b0c9f66da (diff) | |
download | linux-3bb5e2c8fe2296ddd9d864dcfb5ee1b77135f3ec.tar.bz2 |
f2fs: return -EIO when node id is not matched
During the cleaing of node segments, F2FS can get errored node blocks due to
data race between node page lock and its valid bitmap operations.
In that case, it needs to return an error to skip such the obsolete block copy.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index eced8d7bf502..065cd99cc723 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -958,7 +958,7 @@ repeat: goto got_it; lock_page(page); - if (unlikely(!PageUptodate(page))) { + if (unlikely(!PageUptodate(page) || nid != nid_of_node(page))) { f2fs_put_page(page, 1); return ERR_PTR(-EIO); } @@ -967,7 +967,6 @@ repeat: goto repeat; } got_it: - f2fs_bug_on(nid != nid_of_node(page)); mark_page_accessed(page); return page; } |