From: Linus Torvalds Date: Thu, 7 Sep 2017 03:49:49 +0000 (-0700) Subject: Merge branch 'akpm' (patches from Andrew) X-Git-Tag: v4.14-rc1~126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d34fc1adf01ff87026da85fb972dc259dc347540;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - various misc bits - DAX updates - OCFS2 - most of MM * emailed patches from Andrew Morton : (119 commits) mm,fork: introduce MADV_WIPEONFORK x86,mpx: make mpx depend on x86-64 to free up VMA flag mm: add /proc/pid/smaps_rollup mm: hugetlb: clear target sub-page last when clearing huge page mm: oom: let oom_reap_task and exit_mmap run concurrently swap: choose swap device according to numa node mm: replace TIF_MEMDIE checks by tsk_is_oom_victim mm, oom: do not rely on TIF_MEMDIE for memory reserves access z3fold: use per-cpu unbuddied lists mm, swap: don't use VMA based swap readahead if HDD is used as swap mm, swap: add sysfs interface for VMA based swap readahead mm, swap: VMA based swap readahead mm, swap: fix swap readahead marking mm, swap: add swap readahead hit statistics mm/vmalloc.c: don't reinvent the wheel but use existing llist API mm/vmstat.c: fix wrong comment selftests/memfd: add memfd_create hugetlbfs selftest mm/shmem: add hugetlbfs support to memfd_create() mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups mm/vmalloc.c: halve the number of comparisons performed in pcpu_get_vm_areas() ... --- d34fc1adf01ff87026da85fb972dc259dc347540 diff --cc fs/sync.c index 27d6b8bbcb6a,cf57f33fcd16..2e3fd7d94d2d --- a/fs/sync.c +++ b/fs/sync.c @@@ -335,14 -335,9 +335,9 @@@ SYSCALL_DEFINE4(sync_file_range, int, f goto out_put; mapping = f.file->f_mapping; - if (!mapping) { - ret = -EINVAL; - goto out_put; - } - ret = 0; if (flags & SYNC_FILE_RANGE_WAIT_BEFORE) { - ret = filemap_fdatawait_range(mapping, offset, endbyte); + ret = file_fdatawait_range(f.file, offset, endbyte); if (ret < 0) goto out_put; }