[PATCH] vfs: remove redundant sanity check in do_mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In sys_mount, getname() checks dir_name.
So do_mount needn't check dir_name again.

Signed-off-by: Seunghun Lee <waydi1@xxxxxxxxx>
---
 fs/namespace.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index bfd03c6..bf8a9af 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2553,11 +2553,6 @@ long do_mount(const char *dev_name, const char *dir_name,
 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
 		flags &= ~MS_MGC_MSK;
 
-	/* Basic sanity checks */
-
-	if (!dir_name || !*dir_name || !memchr(dir_name, 0, PAGE_SIZE))
-		return -EINVAL;
-
 	if (data_page)
 		((char *)data_page)[PAGE_SIZE - 1] = 0;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux