Lines Matching defs:og

207 	smb_oplock_grant_t	*og;
256 og = smb_oplock_set_grant(ofile, op->op_oplock_level);
257 if (smb_oplock_insert_grant(node, og) != 0) {
258 smb_oplock_clear_grant(og);
298 smb_oplock_grant_t *og;
310 og = list_head(grants);
311 if (og == NULL) {
316 SMB_OPLOCK_GRANT_VALID(og);
319 if (og->og_level == SMB_OPLOCK_LEVEL_II) {
332 (og->og_level != SMB_OPLOCK_BATCH)) {
338 smb_session_levelII_oplocks(og->og_session)) {
347 smb_session_oplock_break(og->og_session,
348 og->og_tid, og->og_fid, brk);
364 if (sr && (sr->session == og->og_session) &&
365 (sr->smb_uid == og->og_uid)) {
448 smb_oplock_grant_t *og;
459 while ((og = list_head(grants)) != NULL) {
460 SMB_OPLOCK_GRANT_VALID(og);
462 if (SMB_OPLOCK_IS_EXCLUSIVE(og->og_level))
465 smb_session_oplock_break(og->og_session,
466 og->og_tid, og->og_fid, SMB_OPLOCK_BREAK_TO_NONE);
467 smb_oplock_remove_grant(node, og);
468 smb_oplock_clear_grant(og);
510 smb_oplock_grant_t *og;
518 og = smb_oplock_exclusive_grant(grants);
519 if (og) {
522 og->og_level = SMB_OPLOCK_NONE;
523 smb_oplock_remove_grant(node, og);
524 smb_oplock_clear_grant(og);
527 og->og_level = SMB_OPLOCK_LEVEL_II;
548 smb_oplock_grant_t *og;
554 og = smb_oplock_get_grant(ol, of);
555 if (og) {
556 smb_oplock_remove_grant(node, og);
557 smb_oplock_clear_grant(og);
587 smb_oplock_grant_t *og;
595 ((og = smb_oplock_get_grant(ol, of)) == NULL)) {
602 og->og_level = SMB_OPLOCK_NONE;
606 og->og_level = SMB_OPLOCK_LEVEL_II;
609 og->og_level = SMB_OPLOCK_NONE;
617 if (og->og_level == SMB_OPLOCK_NONE) {
618 smb_oplock_remove_grant(node, og);
619 smb_oplock_clear_grant(og);
686 smb_oplock_grant_t *og;
688 og = &of->f_oplock_grant;
690 og->og_magic = SMB_OPLOCK_GRANT_MAGIC;
691 og->og_level = level;
692 og->og_ofile = of;
693 og->og_fid = of->f_fid;
694 og->og_tid = of->f_tree->t_tid;
695 og->og_uid = of->f_user->u_uid;
696 og->og_session = of->f_session;
697 return (og);
704 smb_oplock_clear_grant(smb_oplock_grant_t *og)
706 bzero(og, sizeof (smb_oplock_grant_t));
717 smb_oplock_insert_grant(smb_node_t *node, smb_oplock_grant_t *og)
728 list_insert_tail(&ol->ol_grants, og);
741 smb_oplock_remove_grant(smb_node_t *node, smb_oplock_grant_t *og)
748 list_remove(&ol->ol_grants, og);
762 smb_oplock_grant_t *og;
764 og = list_head(grants);
765 if (og) {
766 SMB_OPLOCK_GRANT_VALID(og);
767 if (SMB_OPLOCK_IS_EXCLUSIVE(og->og_level))
768 return (og);