OpenCloudOS-Kernel/fs/f2fs
Jia Zhu f4f0b6777d f2fs: fix m_may_create to make OPU DIO write correctly
Previously, we added a parameter @map.m_may_create to trigger OPU
allocation and call f2fs_balance_fs() correctly.

But in get_more_blocks(), @create has been overwritten by below code.
So the function f2fs_map_blocks() will not allocate new block address
but directly go out. Meanwile,there are several functions calling
f2fs_map_blocks() directly and @map.m_may_create not initialized.
CODE:
create = dio->op == REQ_OP_WRITE;
	if (dio->flags & DIO_SKIP_HOLES) {
		if (fs_startblk <= ((i_size_read(dio->inode) - 1) >>
						i_blkbits))
			create = 0;
	}

This patch fixes it.

Signed-off-by: Jia Zhu <zhujia13@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-11-26 19:46:21 -08:00
..
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.c f2fs: fix wrong return value of f2fs_acl_create 2018-11-26 15:54:37 -08:00
acl.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
checkpoint.c f2fs: clean up f2fs_sb_has_##feature_name 2018-11-26 15:53:55 -08:00
data.c f2fs: fix m_may_create to make OPU DIO write correctly 2018-11-26 19:46:21 -08:00
debug.c f2fs: add to account direct IO 2018-11-26 15:53:56 -08:00
dir.c f2fs: check memory boundary by insane namelen 2018-11-26 15:53:57 -08:00
extent_cache.c f2fs: use rb_*_cached friends 2018-10-16 09:36:59 -07:00
f2fs.h f2fs: make "f2fs_fault_name[]" const char * 2018-11-26 15:54:37 -08:00
file.c f2fs: fix m_may_create to make OPU DIO write correctly 2018-11-26 19:46:21 -08:00
gc.c f2fs: adjust trace print in f2fs_get_victim() to cover all paths 2018-11-26 16:38:49 -08:00
gc.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
hash.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
inline.c Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax 2018-10-28 11:35:40 -07:00
inode.c f2fs: clean up f2fs_sb_has_##feature_name 2018-11-26 15:53:55 -08:00
namei.c f2fs: clean up f2fs_sb_has_##feature_name 2018-11-26 15:53:55 -08:00
node.c f2fs: read page index before freeing 2018-11-26 15:54:37 -08:00
node.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
recovery.c f2fs: clean up f2fs_sb_has_##feature_name 2018-11-26 15:53:55 -08:00
segment.c f2fs: introduce __is_large_section() for cleanup 2018-11-26 15:53:55 -08:00
segment.h f2fs: introduce __is_large_section() for cleanup 2018-11-26 15:53:55 -08:00
shrinker.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
super.c f2fs: make "f2fs_fault_name[]" const char * 2018-11-26 15:54:37 -08:00
sysfs.c f2fs: export migration_granularity sysfs entry 2018-11-26 15:53:56 -08:00
trace.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
trace.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
xattr.c f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00
xattr.h f2fs: add SPDX license identifiers 2018-09-12 13:07:10 -07:00