Lines Matching defs:access

405  * st_{access,deny}_bmap field of the stateid, in order to track not
415 * track of access/deny bit combinations; so, e.g., we allow:
431 unsigned int access = 0;
435 access |= i;
437 return access;
440 /* set share access for a given stateid */
442 set_access(u32 access, struct nfs4_ol_stateid *stp)
444 unsigned char mask = 1 << access;
446 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
450 /* clear share access for a given stateid */
452 clear_access(u32 access, struct nfs4_ol_stateid *stp)
454 unsigned char mask = 1 << access;
456 WARN_ON_ONCE(access > NFS4_SHARE_ACCESS_BOTH);
460 /* test whether a given stateid has access */
462 test_access(u32 access, struct nfs4_ol_stateid *stp)
464 unsigned char mask = 1 << access;
489 /* test whether a given stateid is denying specific access */
498 static int nfs4_access_to_omode(u32 access)
500 switch (access & NFS4_SHARE_ACCESS_BOTH) {
731 * Check if courtesy clients have conflicting access and resolve it if possible
733 * access: is op_share_access if share_access is true.
734 * Check if access mode, op_share_access, would conflict with
736 * access: is op_share_deny if share_access is false.
738 * current access of the file 'fp'.
743 * false - access/deny mode conflict with normal client.
748 struct nfs4_ol_stateid *stp, u32 access, bool share_access)
763 /* check file access against deny mode or vice versa */
765 if (!(access & bmap_to_share_mode(bmap)))
782 __nfs4_file_get_access(struct nfs4_file *fp, u32 access)
786 if (access & NFS4_SHARE_ACCESS_WRITE)
788 if (access & NFS4_SHARE_ACCESS_READ)
793 nfs4_file_get_access(struct nfs4_file *fp, u32 access)
797 /* Does this access mode make sense? */
798 if (access & ~NFS4_SHARE_ACCESS_BOTH)
802 if ((access & fp->fi_share_deny) != 0)
805 __nfs4_file_get_access(fp, access);
847 static void nfs4_file_put_access(struct nfs4_file *fp, u32 access)
849 WARN_ON_ONCE(access & ~NFS4_SHARE_ACCESS_BOTH);
851 if (access & NFS4_SHARE_ACCESS_WRITE)
853 if (access & NFS4_SHARE_ACCESS_READ)
1096 * is used to manage concurrent access. Testing does not need the lock
1426 /* release all access and file references for a given stateid */
2619 unsigned int access, deny;
2636 access = bmap_to_share_mode(ols->st_access_bmap);
2639 seq_printf(s, "access: %s%s, ",
2640 access & NFS4_SHARE_ACCESS_READ ? "r" : "-",
2641 access & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
2713 seq_printf(s, "access: %s, ",
4672 * CLOSE replay. We still do need to release any file access that is held by
5201 int access = nfs4_access_to_access(open->op_share_access);
5208 * current access?
5223 /* set access to the file */
5237 /* Set access bits in stateid */
5249 status = nfsd_file_acquire_opened(rqstp, cur_fh, access,
5265 access));
6922 static inline void nfs4_stateid_downgrade_bit(struct nfs4_ol_stateid *stp, u32 access)
6924 if (!test_access(access, stp))
6926 nfs4_file_put_access(stp->st_stid.sc_file, access);
6927 clear_access(access, stp);
6971 dprintk("NFSD: access not a subset of current bitmap: 0x%hhx, input access=%08x\n",
7418 static void get_lock_access(struct nfs4_ol_stateid *lock_stp, u32 access)
7424 if (test_access(access, lock_stp))
7426 __nfs4_file_get_access(fp, access);
7427 set_access(access, lock_stp);
7899 /* Any valid lock stateid should have some sort of access */