From 45ca2d91cb14bcbe7a06eea6e6d24ae71f1c54bf Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 14 Oct 2012 17:01:26 +0800 Subject: Return positive error number in zfsctl_shares_lookup. Otherwise it will cause zpl_shares_lookup() to return a invalid pointer when an error occurs. Signed-off-by: Brian Behlendorf Signed-off-by: Yuxuan Shui Closes #626 #885 #947 #977 --- module/zfs/zfs_ctldir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs/zfs_ctldir.c') diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 55d169654..41d336564 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -952,7 +952,7 @@ zfsctl_shares_lookup(struct inode *dip, char *name, struct inode **ipp, if (zsb->z_shares_dir == 0) { ZFS_EXIT(zsb); - return (-ENOTSUP); + return (ENOTSUP); } error = zfs_zget(zsb, zsb->z_shares_dir, &dzp); -- cgit v1.2.3