Lines Matching refs:cinode

557 void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)  in cifs_set_oplock_level()  argument
562 cinode->oplock = CIFS_CACHE_WRITE_FLG | CIFS_CACHE_READ_FLG; in cifs_set_oplock_level()
564 &cinode->netfs.inode); in cifs_set_oplock_level()
566 cinode->oplock = CIFS_CACHE_READ_FLG; in cifs_set_oplock_level()
568 &cinode->netfs.inode); in cifs_set_oplock_level()
570 cinode->oplock = 0; in cifs_set_oplock_level()
577 int cifs_get_writer(struct cifsInodeInfo *cinode) in cifs_get_writer() argument
582 rc = wait_on_bit(&cinode->flags, CIFS_INODE_PENDING_OPLOCK_BREAK, in cifs_get_writer()
587 spin_lock(&cinode->writers_lock); in cifs_get_writer()
588 if (!cinode->writers) in cifs_get_writer()
589 set_bit(CIFS_INODE_PENDING_WRITERS, &cinode->flags); in cifs_get_writer()
590 cinode->writers++; in cifs_get_writer()
592 if (test_bit(CIFS_INODE_PENDING_OPLOCK_BREAK, &cinode->flags)) { in cifs_get_writer()
593 cinode->writers--; in cifs_get_writer()
594 if (cinode->writers == 0) { in cifs_get_writer()
595 clear_bit(CIFS_INODE_PENDING_WRITERS, &cinode->flags); in cifs_get_writer()
596 wake_up_bit(&cinode->flags, CIFS_INODE_PENDING_WRITERS); in cifs_get_writer()
598 spin_unlock(&cinode->writers_lock); in cifs_get_writer()
601 spin_unlock(&cinode->writers_lock); in cifs_get_writer()
605 void cifs_put_writer(struct cifsInodeInfo *cinode) in cifs_put_writer() argument
607 spin_lock(&cinode->writers_lock); in cifs_put_writer()
608 cinode->writers--; in cifs_put_writer()
609 if (cinode->writers == 0) { in cifs_put_writer()
610 clear_bit(CIFS_INODE_PENDING_WRITERS, &cinode->flags); in cifs_put_writer()
611 wake_up_bit(&cinode->flags, CIFS_INODE_PENDING_WRITERS); in cifs_put_writer()
613 spin_unlock(&cinode->writers_lock); in cifs_put_writer()
639 void cifs_done_oplock_break(struct cifsInodeInfo *cinode) in cifs_done_oplock_break() argument
641 clear_bit(CIFS_INODE_PENDING_OPLOCK_BREAK, &cinode->flags); in cifs_done_oplock_break()
642 wake_up_bit(&cinode->flags, CIFS_INODE_PENDING_OPLOCK_BREAK); in cifs_done_oplock_break()