projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b56ab83
)
f2fs: fix ERR_PTR returned by bio
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 12 Jul 2016 16:38:48 +0000
(09:38 -0700)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Fri, 15 Jul 2016 22:21:19 +0000
(15:21 -0700)
This is to fix wrong error pointer handling flow reported by Dan.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/data.c
b/fs/f2fs/data.c
index 20b30162e7b4f372b7cedc4d93b0175395094479..650099597dd2d8338dd7388b864fa97aee29e184 100644
(file)
--- a/
fs/f2fs/data.c
+++ b/
fs/f2fs/data.c
@@
-1085,8
+1085,10
@@
submit_and_realloc:
}
if (bio == NULL) {
bio = f2fs_grab_bio(inode, block_nr, nr_pages);
- if (IS_ERR(bio))
+ if (IS_ERR(bio)) {
+ bio = NULL;
goto set_error_page;
+ }
}
if (bio_add_page(bio, page, blocksize, 0) < blocksize)