aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChris Siebenmann <[email protected]>2018-09-05 01:26:56 -0400
committerBrian Behlendorf <[email protected]>2018-09-04 22:26:56 -0700
commitcfa37548ebc880580782b245f2d233ed540e7a01 (patch)
tree7ac359a1cd683dafdac813cbd47c8c5524665bc6 /module
parent0405eeea6a8d142171ce352d3dac5f08cd6f70f0 (diff)
Correctly handle errors from kern_path
As a regular kernel function, kern_path() returns errors as negative errnos, such as -ELOOP. zfsctl_snapdir_vget() must convert these into the positive errnos used throughout the ZFS code when it returns them to other ZFS functions so that the ZFS code properly sees them as errors. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Siebenmann <[email protected]> Closes #7764 Closes #7864
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zfs_ctldir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
index 8a35c9947..f5cfdb55d 100644
--- a/module/zfs/zfs_ctldir.c
+++ b/module/zfs/zfs_ctldir.c
@@ -1177,7 +1177,7 @@ zfsctl_snapdir_vget(struct super_block *sb, uint64_t objsetid, int gen,
goto out;
/* Trigger automount */
- error = kern_path(mnt, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &path);
+ error = -kern_path(mnt, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &path);
if (error)
goto out;