Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs We expect VOP_ACC...



details:   https://anonhg.NetBSD.org/src/rev/5833e470b312
branches:  trunk
changeset: 446232:5833e470b312
user:      hannken <hannken%NetBSD.org@localhost>
date:      Wed Nov 28 09:57:16 2018 +0000

description:
We expect VOP_ACCESS() to return EACCESS as general error.

Change zfs_netbsd_access() to translate the common EPERM to EACCES.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r ce2d953a56ce -r 5833e470b312 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Wed Nov 28 09:56:40 2018 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Wed Nov 28 09:57:16 2018 +0000
@@ -5053,6 +5053,10 @@
        KASSERT(VOP_ISLOCKED(vp));
        error = zfs_access(vp, zfs_mode, 0, cred, NULL);
 
+       /* We expect EACCES as common error. */
+       if (error == EPERM)
+               error = EACCES;
+
        return (error);
 }
 



Home | Main Index | Thread Index | Old Index