fs: remove unnecessary NULL f_mapping check in sync_file_range
PATCH 1/1 fs: 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.
Signed-off-by Jeff Layton <[email protected]>
--- fs/sync.c | 5 ----- 1 file changed, 5 deletions(-)
fs/sync.c +0 -5
@@ -335,11 +335,6 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, 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);
Signature · 1 line
2.9.4