Lines Matching refs:lctx

92 static int alloc_lease(struct oplock_info *opinfo, struct lease_ctx_info *lctx)
100 memcpy(lease->lease_key, lctx->lease_key, SMB2_LEASE_KEY_SIZE);
101 lease->state = lctx->req_state;
103 lease->flags = lctx->flags;
104 lease->duration = lctx->duration;
105 lease->is_dir = lctx->is_dir;
106 memcpy(lease->parent_lease_key, lctx->parent_lease_key, SMB2_LEASE_KEY_SIZE);
107 lease->version = lctx->version;
108 lease->epoch = le16_to_cpu(lctx->epoch) + 1;
427 * @lctx: lease context information
432 struct lease_ctx_info *lctx)
441 if (lctx) {
442 lease->state = lctx->req_state;
443 memcpy(lease->lease_key, lctx->lease_key, SMB2_LEASE_KEY_SIZE);
450 * @lctx: lease context information
455 struct lease_ctx_info *lctx)
461 if (lctx) {
463 if (lctx->req_state & SMB2_LEASE_HANDLE_CACHING_LE)
465 memcpy(lease->lease_key, lctx->lease_key, SMB2_LEASE_KEY_SIZE);
472 * @lctx: lease context information
477 struct lease_ctx_info *lctx)
483 if (lctx) {
485 memcpy(lease->lease_key, lctx->lease_key, SMB2_LEASE_KEY_SIZE);
508 * @lctx: lease context information
514 struct lease_ctx_info *lctx)
521 if (!lctx)
535 ret = compare_guid_key(opinfo, client_guid, lctx->lease_key);
548 lease->state == (lctx->req_state & lease->state)) {
550 lease->state |= lctx->req_state;
551 if (lctx->req_state &
558 if (lctx->req_state ==
562 lease->state = lctx->req_state;
566 if (lctx->req_state && lease->state ==
569 lease_none_upgrade(opinfo, lctx->req_state);
980 struct lease_ctx_info *lctx)
986 if (!lctx)
1013 lctx->lease_key);
1078 struct lease_ctx_info *lctx)
1083 grant_write_oplock(opinfo, level, lctx);
1086 grant_read_oplock(opinfo, lctx);
1089 grant_none_oplock(opinfo, lctx);
1095 struct lease_ctx_info *lctx)
1100 if (lctx->version != 2)
1113 (!(lctx->flags & SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET_LE) ||
1115 lctx->parent_lease_key))) {
1184 * @lctx: lease context information on file open
1191 struct lease_ctx_info *lctx, int share_ret)
1202 if (!lctx || lctx->version != 2)
1210 if (lctx) {
1211 err = alloc_lease(opinfo, lctx);
1229 if (lctx) {
1234 lctx);
1245 (prev_opinfo->level == SMB2_OPLOCK_LEVEL_NONE && lctx)) {
1285 if (prev_op_has_lease && !lctx)
1289 if (!prev_op_has_lease && lctx) {
1291 lctx->req_state = SMB2_LEASE_READ_CACHING_LE;
1295 set_oplock_level(opinfo, req_op_level, lctx);