patch-2.2.6 linux/fs/nfs/symlink.c
Next file: linux/fs/nfsd/nfs3proc.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Mon Apr 12 09:57:11 1999
- Orig file:
v2.2.5/linux/fs/nfs/symlink.c
- Orig date:
Mon Sep 28 10:51:35 1998
diff -u --recursive --new-file v2.2.5/linux/fs/nfs/symlink.c linux/fs/nfs/symlink.c
@@ -54,13 +54,12 @@
dfprintk(VFS, "nfs: readlink(%s/%s)\n",
dentry->d_parent->d_name.name, dentry->d_name.name);
- if (buflen > NFS_MAXPATHLEN)
- buflen = NFS_MAXPATHLEN;
error = nfs_proc_readlink(NFS_DSERVER(dentry), NFS_FH(dentry),
- &mem, &res, &len, buflen);
+ &mem, &res, &len, NFS_MAXPATHLEN);
if (! error) {
+ if (len > buflen)
+ len = buflen;
copy_to_user(buffer, res, len);
- put_user('\0', buffer + len);
error = len;
kfree(mem);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)