Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300161
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] f2fs: check the page status filled from disk |
| Date | 2016-01-03 02:30 +0100 |
| Message-ID | <qMFEC-7c8-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
After reading a page, we need to check whether there is any error.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/data.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 89a978c..11b2111 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -448,6 +448,14 @@ repeat:
/* wait for read completion */
lock_page(page);
+ if (unlikely(!PageUptodate(page))) {
+ f2fs_put_page(page, 1);
+ return ERR_PTR(-EIO);
+ }
+ if (unlikely(page->mapping != mapping)) {
+ f2fs_put_page(page, 1);
+ goto repeat;
+ }
}
got_it:
if (new_i_size && i_size_read(inode) <
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/3] f2fs: check the page status filled from disk Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-03 02:30 +0100
[PATCH 2/3] f2fs: cover more area with nat_tree_lock Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-03 02:30 +0100
RE: [f2fs-dev] [PATCH 2/3] f2fs: cover more area with nat_tree_lock Chao Yu <chao2.yu@samsung.com> - 2016-01-05 10:40 +0100
Re: [f2fs-dev] [PATCH 2/3] f2fs: cover more area with nat_tree_lock Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-05 19:00 +0100
RE: [f2fs-dev] [PATCH 2/3] f2fs: cover more area with nat_tree_lock Chao Yu <chao2.yu@samsung.com> - 2016-01-06 05:00 +0100
[PATCH 3/3] Revert "f2fs: check the node block address of newly allocated nid" Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-03 02:30 +0100
RE: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk Chao Yu <chao2.yu@samsung.com> - 2016-01-05 10:40 +0100
Re: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-05 18:50 +0100
RE: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk Chao Yu <chao2.yu@samsung.com> - 2016-01-06 02:30 +0100
Re: [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-06 03:40 +0100
Re: [PATCH 1/3 v2] f2fs: check the page status filled from disk Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-06 05:20 +0100
RE: [f2fs-dev] [PATCH 1/3 v2] f2fs: check the page status filled from disk Chao Yu <chao2.yu@samsung.com> - 2016-01-06 06:30 +0100
csiph-web