Lines Matching defs:access
569 __nfs4_file_get_access(struct nfs4_file *fp, u32 access)
573 if (access & NFS4_SHARE_ACCESS_WRITE)
575 if (access & NFS4_SHARE_ACCESS_READ)
580 nfs4_file_get_access(struct nfs4_file *fp, u32 access)
584 /* Does this access mode make sense? */
585 if (access & ~NFS4_SHARE_ACCESS_BOTH)
589 if ((access & fp->fi_share_deny) != 0)
592 __nfs4_file_get_access(fp, access);
634 static void nfs4_file_put_access(struct nfs4_file *fp, u32 access)
636 WARN_ON_ONCE(access & ~NFS4_SHARE_ACCESS_BOTH);
638 if (access & NFS4_SHARE_ACCESS_WRITE)
640 if (access & NFS4_SHARE_ACCESS_READ)
877 * is used to manage concurrent access. Testing does not need the lock
1173 * st_{access,deny}_bmap field of the stateid, in order to track not
1181 * track of access/deny bit combinations; so, e.g., we allow:
1192 unsigned int access = 0;
1196 access |= i;
1198 return access;
1201 /* set share access for a given stateid */
1203 set_access(u32 access, struct nfs4_ol_stateid *stp)
1205 unsigned char mask = 1 << access;
1207 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
1211 /* clear share access for a given stateid */
1213 clear_access(u32 access, struct nfs4_ol_stateid *stp)
1215 unsigned char mask = 1 << access;
1217 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
1221 /* test whether a given stateid has access */
1223 test_access(u32 access, struct nfs4_ol_stateid *stp)
1225 unsigned char mask = 1 << access;
1250 /* test whether a given stateid is denying specific access */
1259 static int nfs4_access_to_omode(u32 access)
1261 switch (access & NFS4_SHARE_ACCESS_BOTH) {
1307 /* release all access and file references for a given stateid */
2469 unsigned int access, deny;
2486 access = bmap_to_share_mode(ols->st_access_bmap);
2489 seq_printf(s, "access: %s%s, ",
2490 access & NFS4_SHARE_ACCESS_READ ? "r" : "-",
2491 access & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
2563 seq_printf(s, "access: %s, ",
4410 * CLOSE replay. We still do need to release any file access that is held by
4873 int access = nfs4_access_to_access(open->op_share_access);
4880 * current access?
4888 /* set access to the file */
4895 /* Set access bits in stateid */
4906 status = nfsd_file_acquire(rqstp, cur_fh, access, &nf);
4920 access));
6150 static inline void nfs4_stateid_downgrade_bit(struct nfs4_ol_stateid *stp, u32 access)
6152 if (!test_access(access, stp))
6154 nfs4_file_put_access(stp->st_stid.sc_file, access);
6155 clear_access(access, stp);
6199 dprintk("NFSD: access not a subset of current bitmap: 0x%hhx, input access=%08x\n",
6625 static void get_lock_access(struct nfs4_ol_stateid *lock_stp, u32 access)
6631 if (test_access(access, lock_stp))
6633 __nfs4_file_get_access(fp, access);
6634 set_access(access, lock_stp);
7088 /* Any valid lock stateid should have some sort of access */