f2fs: avoid fsync() failure caused by EAGAIN in writepage()
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 May 2018 06:26:02 +0000 (23:26 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 May 2018 21:19:05 +0000 (14:19 -0700)
commit1ccd6c4ff9ccd74bb87903067618815d326af242
treea1e3f5af90b46f915ef50b3fe7a6cdcc63b8d0ac
parentea3ffc6f12afa6e3c84173ec94601bc635e0900e
f2fs: avoid fsync() failure caused by EAGAIN in writepage()

pageout() in MM traslates EAGAIN, so calls handle_write_error()
 -> mapping_set_error() -> set_bit(AS_EIO, ...).
 file_write_and_wait_range() will see EIO error, which is critical
 to return value of fsync() followed by atomic_write failure to user.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c