Date: Sun, 1 Dec 2019 00:34:49 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355255 - head/sys/fs/tmpfs Message-ID: <201912010034.xB10YnHq009601@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Sun Dec 1 00:34:49 2019 New Revision: 355255 URL: https://svnweb.freebsd.org/changeset/base/355255 Log: tmpfs: use proper macros for permission values in tmpfs_access While here group them in one var to prevent overy long lines. Perhaps a general macro of the same sort should be introduced. Requested by: kib Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Dec 1 00:22:04 2019 (r355254) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Dec 1 00:34:49 2019 (r355255) @@ -323,7 +323,7 @@ tmpfs_access(struct vop_access_args *v) struct vnode *vp = v->a_vp; accmode_t accmode = v->a_accmode; struct ucred *cred = v->a_cred; - + mode_t all_x = S_IXUSR | S_IXGRP | S_IXOTH; int error; struct tmpfs_node *node; @@ -334,7 +334,7 @@ tmpfs_access(struct vop_access_args *v) /* * Common case path lookup. */ - if (__predict_true(accmode == VEXEC && (node->tn_mode & 0111) == 0111)) + if (__predict_true(accmode == VEXEC && (node->tn_mode & all_x) == all_x)) return (0); switch (vp->v_type) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912010034.xB10YnHq009601>