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:
parent
a4adf6cc65
commit
ba08feecbf
@ -323,7 +323,7 @@ tmpfs_access(struct vop_access_args *v)
|
|||||||
struct vnode *vp = v->a_vp;
|
struct vnode *vp = v->a_vp;
|
||||||
accmode_t accmode = v->a_accmode;
|
accmode_t accmode = v->a_accmode;
|
||||||
struct ucred *cred = v->a_cred;
|
struct ucred *cred = v->a_cred;
|
||||||
|
mode_t all_x = S_IXUSR | S_IXGRP | S_IXOTH;
|
||||||
int error;
|
int error;
|
||||||
struct tmpfs_node *node;
|
struct tmpfs_node *node;
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ tmpfs_access(struct vop_access_args *v)
|
|||||||
/*
|
/*
|
||||||
* Common case path lookup.
|
* 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);
|
return (0);
|
||||||
|
|
||||||
switch (vp->v_type) {
|
switch (vp->v_type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user