Home
last modified time | relevance | path

Searched refs:cinode (Results 1 – 10 of 10) sorted by relevance

/fs/cifs/
Dmisc.c527 void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock) in cifs_set_oplock_level() argument
532 cinode->oplock = CIFS_CACHE_WRITE_FLG | CIFS_CACHE_READ_FLG; in cifs_set_oplock_level()
534 &cinode->vfs_inode); in cifs_set_oplock_level()
536 cinode->oplock = CIFS_CACHE_READ_FLG; in cifs_set_oplock_level()
538 &cinode->vfs_inode); in cifs_set_oplock_level()
540 cinode->oplock = 0; in cifs_set_oplock_level()
547 int cifs_get_writer(struct cifsInodeInfo *cinode) in cifs_get_writer() argument
552 rc = wait_on_bit(&cinode->flags, CIFS_INODE_PENDING_OPLOCK_BREAK, in cifs_get_writer()
557 spin_lock(&cinode->writers_lock); in cifs_get_writer()
558 if (!cinode->writers) in cifs_get_writer()
[all …]
Dsmb2misc.c440 smb2_get_lease_state(struct cifsInodeInfo *cinode) in smb2_get_lease_state() argument
444 if (CIFS_CACHE_WRITE(cinode)) in smb2_get_lease_state()
446 if (CIFS_CACHE_HANDLE(cinode)) in smb2_get_lease_state()
448 if (CIFS_CACHE_READ(cinode)) in smb2_get_lease_state()
483 struct cifsInodeInfo *cinode; in smb2_tcon_has_lease() local
491 cinode = CIFS_I(d_inode(cfile->dentry)); in smb2_tcon_has_lease()
493 if (memcmp(cinode->lease_key, rsp->LeaseKey, in smb2_tcon_has_lease()
506 set_bit(CIFS_INODE_PENDING_OPLOCK_BREAK, &cinode->flags); in smb2_tcon_has_lease()
515 &cinode->flags); in smb2_tcon_has_lease()
518 &cinode->flags); in smb2_tcon_has_lease()
[all …]
Dfile.c267 cifs_has_mand_locks(struct cifsInodeInfo *cinode) in cifs_has_mand_locks() argument
272 down_read(&cinode->lock_sem); in cifs_has_mand_locks()
273 list_for_each_entry(cur, &cinode->llist, llist) { in cifs_has_mand_locks()
279 up_read(&cinode->lock_sem); in cifs_has_mand_locks()
296 struct cifsInodeInfo *cinode = CIFS_I(inode); in cifs_new_fileinfo() local
333 if (server->ops->is_read_op(oplock) && cifs_has_mand_locks(cinode)) { in cifs_new_fileinfo()
338 cifs_down_write(&cinode->lock_sem); in cifs_new_fileinfo()
339 list_add(&fdlocks->llist, &cinode->llist); in cifs_new_fileinfo()
340 up_write(&cinode->lock_sem); in cifs_new_fileinfo()
354 list_add(&cfile->flist, &cinode->openFileList); in cifs_new_fileinfo()
[all …]
Dsmb2file.c118 struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); in smb2_unlock_range() local
142 cifs_down_write(&cinode->lock_sem); in smb2_unlock_range()
150 if (cinode->can_cache_brlcks) { in smb2_unlock_range()
203 up_write(&cinode->lock_sem); in smb2_unlock_range()
256 struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); in smb2_push_mandatory_locks() local
280 list_for_each_entry(fdlocks, &cinode->llist, llist) { in smb2_push_mandatory_locks()
Dsmb2ops.c795 struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); in smb2_set_fid() local
800 server->ops->set_oplock_level(cinode, oplock, fid->epoch, in smb2_set_fid()
802 cinode->can_cache_brlcks = CIFS_CACHE_WRITE(cinode); in smb2_set_fid()
1325 struct cifsInodeInfo *cinode) in smb2_oplock_response() argument
1328 return SMB2_lease_break(0, tcon, cinode->lease_key, in smb2_oplock_response()
1329 smb2_get_lease_state(cinode)); in smb2_oplock_response()
1333 CIFS_CACHE_READ(cinode) ? 1 : 0); in smb2_oplock_response()
1926 struct cifsInodeInfo *cinode, bool set_level2) in smb2_downgrade_oplock() argument
1929 server->ops->set_oplock_level(cinode, SMB2_OPLOCK_LEVEL_II, in smb2_downgrade_oplock()
1932 server->ops->set_oplock_level(cinode, 0, 0, NULL); in smb2_downgrade_oplock()
[all …]
Dsmb1ops.c382 struct cifsInodeInfo *cinode, bool set_level2) in cifs_downgrade_oplock() argument
385 cifs_set_oplock_level(cinode, OPLOCK_READ); in cifs_downgrade_oplock()
387 cifs_set_oplock_level(cinode, 0); in cifs_downgrade_oplock()
729 struct cifsInodeInfo *cinode = CIFS_I(d_inode(cfile->dentry)); in cifs_set_fid() local
731 cifs_set_oplock_level(cinode, oplock); in cifs_set_fid()
732 cinode->can_cache_brlcks = CIFS_CACHE_WRITE(cinode); in cifs_set_fid()
778 struct cifsInodeInfo *cinode = CIFS_I(inode); in smb_set_file_info() local
784 open_file = find_writable_file(cinode, true); in smb_set_file_info()
803 cinode->cifsAttrs = le32_to_cpu(buf->Attributes); in smb_set_file_info()
831 cinode->cifsAttrs = le32_to_cpu(buf->Attributes); in smb_set_file_info()
[all …]
Dcifsglob.h1202 #define CIFS_CACHE_READ(cinode) (cinode->oplock & CIFS_CACHE_READ_FLG) argument
1203 #define CIFS_CACHE_HANDLE(cinode) (cinode->oplock & CIFS_CACHE_HANDLE_FLG) argument
1204 #define CIFS_CACHE_WRITE(cinode) (cinode->oplock & CIFS_CACHE_WRITE_FLG) argument
Dcifsproto.h144 extern void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock);
145 extern int cifs_get_writer(struct cifsInodeInfo *cinode);
146 extern void cifs_put_writer(struct cifsInodeInfo *cinode);
147 extern void cifs_done_oplock_break(struct cifsInodeInfo *cinode);
Dcifsfs.c788 struct cifsInodeInfo *cinode = CIFS_I(inode); in cifs_file_write_iter() local
794 if (written > 0 && CIFS_CACHE_READ(cinode)) { in cifs_file_write_iter()
799 cinode->oplock = 0; in cifs_file_write_iter()
804 written = cifs_get_writer(cinode); in cifs_file_write_iter()
819 cifs_put_writer(cinode); in cifs_file_write_iter()
Dsmb2proto.h60 extern __le32 smb2_get_lease_state(struct cifsInodeInfo *cinode);