patch-2.1.103 linux/fs/sysv/namei.c

Next file: linux/fs/umsdos/README-WIP.txt
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.102/linux/fs/sysv/namei.c linux/fs/sysv/namei.c
@@ -69,11 +69,12 @@
 	if (!dir)
 		return NULL;
 	sb = dir->i_sb;
-	if (namelen > SYSV_NAMELEN)
+	if (namelen > SYSV_NAMELEN) {
 		if (sb->sv_truncate)
 			namelen = SYSV_NAMELEN;
 		else
 			return NULL;
+	}
 	bh = NULL;
 	pos = block = offset = 0;
 	while (pos < dir->i_size) {
@@ -152,11 +153,12 @@
 	if (!dir)
 		return -ENOENT;
 	sb = dir->i_sb;
-	if (namelen > SYSV_NAMELEN)
+	if (namelen > SYSV_NAMELEN) {
 		if (sb->sv_truncate)
 			namelen = SYSV_NAMELEN;
 		else
 			return -ENAMETOOLONG;
+	}
 	if (!namelen)
 		return -ENOENT;
 	bh = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov