The patch titled Subject: fs/sync.c: remove unnecessary NULL f_mapping check in sync_file_range has been added to the -mm tree. Its filename is fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.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: Jeff Layton <jlayton@xxxxxxxxxx> Subject: fs/sync.c: remove unnecessary NULL f_mapping check in sync_file_range fsync codepath assumes that f_mapping can never be NULL, but sync_file_range has a check for that. Remove the one from sync_file_range as I don't see how you'd ever get a NULL pointer in here. Link: http://lkml.kernel.org/r/20170525110509.9434-1-jlayton@xxxxxxxxxx Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/sync.c | 5 ----- 1 file changed, 5 deletions(-) diff -puN fs/sync.c~fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range fs/sync.c --- a/fs/sync.c~fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range +++ a/fs/sync.c @@ -335,11 +335,6 @@ SYSCALL_DEFINE4(sync_file_range, int, fd 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); _ Patches currently in -mm which might be from jlayton@xxxxxxxxxx are fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.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