patch-2.3.36 linux/fs/ufs/namei.c

Next file: linux/fs/ufs/super.c
Previous file: linux/fs/udf/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.35/linux/fs/ufs/namei.c linux/fs/ufs/namei.c
@@ -764,7 +764,7 @@
 
 	err = -ENAMETOOLONG;
 	l = strlen(symname)+1;
-	if (l > dir->i_sb->s_blocksize)
+	if (l > sb->s_blocksize)
 		goto out;
 
 	err = -EIO;
@@ -774,8 +774,7 @@
 	}
 	inode->i_mode = S_IFLNK | S_IRWXUGO;
 
-	/***if (l > sizeof (inode->u.ufs_i.i_data)) {***/
-	if (1) {
+	if (l > sb->u.ufs_sb.s_uspi->s_maxsymlinklen) {
 		/* slow symlink */
 		inode->i_op = &ufs_symlink_inode_operations;
 		err = block_symlink(inode, symname, l);

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