From 5095000169f695ea6b65d74da917c3f465d05aab Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 17 Feb 2011 09:48:06 -0800 Subject: [PATCH] Use -zfs_readlink() error The zfs_readlink() function returns a Solaris positive error value and that needs to be converted to a Linux negative error value. While in this case nothing would actually go wrong, it's still incorrect and should be fixed if for no other reason than clarity. --- module/zfs/zpl_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index 75d299b47..888dc17cc 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -262,7 +262,7 @@ zpl_follow_link(struct dentry *dentry, struct nameidata *nd) uio.uio_resid = (MAXPATHLEN - 1); uio.uio_segflg = UIO_SYSSPACE; - error = zfs_readlink(ip, &uio, cr); + error = -zfs_readlink(ip, &uio, cr); if (error) { kmem_free(link, MAXPATHLEN); nd_set_link(nd, ERR_PTR(error));