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 <behlendorf1@llnl.gov>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Closes #626 #885 #947 #977
This commit is contained in:
Yuxuan Shui 2012-10-14 17:01:26 +08:00 committed by Brian Behlendorf
parent 26099167e6
commit 45ca2d91cb

View File

@ -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);