VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Linus Torvalds <torvalds@linux-foundation.org> 2017-09-06 20:49:49 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2017-09-06 20:49:49 -0700 commit: d34fc1adf01ff87026da85fb972dc259dc347540 parent: 1c9fe4409ce3e9c78b1ed96ee8ed699d4f03bf33
Commit Summary:
Merge branch 'akpm' (patches from Andrew)
Diffstat:
1 file changed, 0 insertions, 5 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 27d6b8bbcb6a..2e3fd7d94d2d 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -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 = file_fdatawait_range(f.file, offset, endbyte);