The patch titled Subject: ipc: shm: shm_fallocate use -ENOTSUPP has been added to the -mm tree. Its filename is ipc-shm-restore-madv_remove-functionality-on-shared-memory-segments-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Hugh Dickins <hughd@xxxxxxxxxx> Subject: ipc: shm: shm_fallocate use -ENOTSUPP When underlying filesystem (i.e. hugetlbfs) does not support fallocate(), let shm_fallocate() fail with -EOPNOTSUPP rather than -EINVAL: so that madvise(,,MADV_REMOVE) gives the same error as it does wherever else fallocate() is unsupported. vmtruncate_range() gave -ENOSYS in this case, but that was not quite right. Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN ipc/shm.c~ipc-shm-restore-madv_remove-functionality-on-shared-memory-segments-fix ipc/shm.c --- a/ipc/shm.c~ipc-shm-restore-madv_remove-functionality-on-shared-memory-segments-fix +++ a/ipc/shm.c @@ -399,7 +399,7 @@ static long shm_fallocate(struct file *f struct shm_file_data *sfd = shm_file_data(file); if (!sfd->file->f_op->fallocate) - return -EINVAL; + return -EOPNOTSUPP; return sfd->file->f_op->fallocate(file, mode, offset, len); } _ Subject: Subject: ipc: shm: shm_fallocate use -ENOTSUPP Patches currently in -mm which might be from hughd@xxxxxxxxxx are origin.patch linux-next.patch shmem-replace_page-must-flush_dcache-and-others.patch ipc-shm-restore-madv_remove-functionality-on-shared-memory-segments.patch ipc-shm-restore-madv_remove-functionality-on-shared-memory-segments-fix.patch mm-correctly-synchronize-rss-counters-at-exit-exec.patch tmpfs-implement-numa-node-interleaving.patch tmpfs-implement-numa-node-interleaving-fix.patch memcg-rename-mem_cgroup_stat_swapout-as-mem_cgroup_stat_swap.patch memcg-remove-mem_cgroup_charge_type_force.patch documentation-update-how-page-cluster-affects-swap-i-o.patch prio_tree-debugging-patch.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html