Skip to contentSkip to conversation

fs: Delete always true compilation define

PATCH RESEND New Leon Romanovsky 1 participant 1 message Aug 19, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 fs: Delete always true compilation define

From: Leon Romanovsky <[email protected]>

In commit 1027abe8827b ("[PATCH] merge locate_fd() and get_unused_fd()") the existing "#if 1" was moved from one place to another. Originally that compilation define was set for the sanity check and more than 12 years later it is safe to remove it.

---
 fs/file.c | 2 --
 1 file changed, 2 deletions(-)
fs/file.c +0 -2
index 21c0893f2f1d..13a89df7c74e 100644
@@ -535,13 +535,11 @@ int __alloc_fd(struct files_struct *files,
 	else
 		__clear_close_on_exec(fd, fdt);
 	error = fd;
-#if 1
 	/* Sanity check */
 	if (rcu_access_pointer(fdt->fd[fd]) != NULL) {
 		printk(KERN_WARNING "alloc_fd: slot %d not NULL!\n", fd);
 		rcu_assign_pointer(fdt->fd[fd], NULL);
 	}
-#endif
 
 out:
 	spin_unlock(&files->file_lock);

--
2.26.2