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
This commit is contained in:
Mateusz Guzik 2019-12-01 00:34:49 +00:00
parent a4adf6cc65
commit ba08feecbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355255

View File

@ -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) {