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:
08e4126
)
f2fs: avoid infinite loop on cp_error
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Sat, 10 Jan 2015 00:27:17 +0000
(16:27 -0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Thu, 12 Feb 2015 01:04:30 +0000
(17:04 -0800)
If cp_error is set, we should avoid all the infinite loop.
In f2fs_sync_file, there is a hole, and this patch fixes that.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index 5df336757d6c541b1ce1efa87505b6fbe41a888a..710adc987937879da8f218ead8847717c34878ef 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-247,6
+247,10
@@
go_write:
sync_nodes:
sync_node_pages(sbi, ino, &wbc);
+ /* if cp_error was enabled, we should avoid infinite loop */
+ if (unlikely(f2fs_cp_error(sbi)))
+ goto out;
+
if (need_inode_block_update(sbi, ino)) {
mark_inode_dirty_sync(inode);
f2fs_write_inode(inode, NULL);