linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: Delete always true compilation define
@ 2020-06-11 13:02 Leon Romanovsky
  0 siblings, 0 replies; only message in thread
From: Leon Romanovsky @ 2020-06-11 13:02 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Leon Romanovsky, linux-fsdevel, linux-kernel

From: Leon Romanovsky <leonro@mellanox.com>

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.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 fs/file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/file.c b/fs/file.c
index c8a4e4c86e55..cab9d55765dd 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -522,13 +522,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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-11 13:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 13:02 [PATCH] fs: Delete always true compilation define Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).