Skip to content

Commit

Permalink
Return positive error number in zfsctl_shares_lookup.
Browse files Browse the repository at this point in the history
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 openzfs#626 openzfs#885 openzfs#947 openzfs#977
  • Loading branch information
yshui authored and unya committed Dec 13, 2013
1 parent 88a7e15 commit f73e2ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zfs_ctldir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f73e2ad

Please sign in to comment.