patch-2.3.99-pre6 linux/fs/autofs/root.c

Next file: linux/fs/autofs4/Makefile
Previous file: linux/fs/autofs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/fs/autofs/root.c linux/fs/autofs/root.c
@@ -186,7 +186,7 @@
 	autofs_say(dentry->d_name.name,dentry->d_name.len);
 
 	if (dentry->d_name.len > NAME_MAX)
-		return ERR_PTR(-ENOENT);/* File name too long to exist */
+		return ERR_PTR(-ENAMETOOLONG);/* File name too long to exist */
 
 	sbi = autofs_sbi(dir->i_sb);
 
@@ -248,9 +248,6 @@
 	if ( !autofs_oz_mode(sbi) )
 		return -EACCES;
 
-	if ( dentry->d_name.len > NAME_MAX )
-		return -ENAMETOOLONG;
-
 	if ( autofs_hash_lookup(dh, &dentry->d_name) )
 		return -EEXIST;
 
@@ -374,9 +371,6 @@
 
 	if ( !autofs_oz_mode(sbi) )
 		return -EACCES;
-
-	if ( dentry->d_name.len > NAME_MAX )
-		return -ENAMETOOLONG;
 
 	ent = autofs_hash_lookup(dh, &dentry->d_name);
 	if ( ent )

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)