diff options
author | Chris Siebenmann <[email protected]> | 2018-09-05 01:26:56 -0400 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2018-07-06 02:46:51 -0700 |
commit | 88ef5b238bef9293eabec8f44432e71260690f9a (patch) | |
tree | d5d24b188f1797fa72e499b71ea0eb4edbb117f6 /module | |
parent | 30d8b8570243fe5b944f26a964cf5204cb1e71e0 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 3ff2c101b..98897fe6e 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -1181,7 +1181,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; |