Skip to contentSkip to conversation

fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 7, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: fs/sync.c: remove unnecessary NULL f_mapping check in sync_file_range
has been removed from the -mm tree. Its filename was
fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jeff Layton <[email protected]>
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.

---

 fs/sync.c |    5 -----
 1 file changed, 5 deletions(-)
fs/sync.c renamed from fs/sync.c~fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range +0 -4
diff -puN fs/sync.c~fs-remove-unnecessary-null-f_mapping-check-in-sync_file_range 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;
-	}