Lines Matching defs:deny
588 /* Does it conflict with a deny mode already set? */
596 static __be32 nfs4_file_check_deny(struct nfs4_file *fp, u32 deny)
598 /* Common case is that there is no deny mode. */
599 if (deny) {
600 /* Does this deny mode make sense? */
601 if (deny & ~NFS4_SHARE_DENY_BOTH)
604 if ((deny & NFS4_SHARE_DENY_READ) &&
608 if ((deny & NFS4_SHARE_DENY_WRITE) &&
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:
1183 * OPEN allow read, deny write
1184 * OPEN allow both, deny none
1185 * DOWNGRADE allow read, deny none
1230 /* set share deny for a given stateid */
1232 set_deny(u32 deny, struct nfs4_ol_stateid *stp)
1234 unsigned char mask = 1 << deny;
1236 WARN_ON_ONCE(deny > NFS4_SHARE_DENY_BOTH);
1240 /* clear share deny for a given stateid */
1242 clear_deny(u32 deny, struct nfs4_ol_stateid *stp)
1244 unsigned char mask = 1 << deny;
1246 WARN_ON_ONCE(deny > NFS4_SHARE_DENY_BOTH);
1252 test_deny(u32 deny, struct nfs4_ol_stateid *stp)
1254 unsigned char mask = 1 << deny;
1274 * A stateid that had a deny mode associated with it is being released
1275 * or downgraded. Recalculate the deny mode on the file.
1290 reset_union_bmap_deny(u32 deny, struct nfs4_ol_stateid *stp)
1296 if ((i & deny) != i) {
1302 /* Recalculate per-file deny mode if there was a change */
2469 unsigned int access, deny;
2487 deny = bmap_to_share_mode(ols->st_deny_bmap);
2492 seq_printf(s, "deny: %s%s, ",
2493 deny & NFS4_SHARE_ACCESS_READ ? "r" : "-",
2494 deny & NFS4_SHARE_ACCESS_WRITE ? "w" : "-");
4502 * Called to check deny when READ with all zero stateid or
4879 * Are we trying to set a deny mode that would conflict with
4899 /* Set new deny mask */
4945 /* test and set deny mode */
6204 dprintk("NFSD: deny not a subset of current bitmap: 0x%hhx, input deny=%08x\n",
6411 nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny)
6417 xdr_netobj_dup(&deny->ld_owner, &lo->lo_owner.so_owner,
6419 if (!deny->ld_owner.data)
6422 deny->ld_clientid = lo->lo_owner.so_client->cl_clientid;
6425 deny->ld_owner.len = 0;
6426 deny->ld_owner.data = NULL;
6427 deny->ld_clientid.cl_boot = 0;
6428 deny->ld_clientid.cl_id = 0;
6430 deny->ld_start = fl->fl_start;
6431 deny->ld_length = NFS4_MAX_UINT64;
6433 deny->ld_length = fl->fl_end - fl->fl_start + 1;
6434 deny->ld_type = NFS4_READ_LT;
6436 deny->ld_type = NFS4_WRITE_LT;