4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yunlei He <heyunlei@xxxxxxxxxx> [ Upstream commit cba41be08cb182476fec4d318a8a8f2f8361a901 ] This patch fix missing clear FI_NO_PREALLOC in some error case Signed-off-by: Yunlei He <heyunlei@xxxxxxxxxx> Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/f2fs/file.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2927,6 +2927,8 @@ static ssize_t f2fs_file_write_iter(stru iov_iter_count(from)) || f2fs_has_inline_data(inode) || f2fs_force_buffered_io(inode, WRITE)) { + clear_inode_flag(inode, + FI_NO_PREALLOC); inode_unlock(inode); return -EAGAIN; }