Lines Matching refs:cifs_file

541 cifsFileInfo_get(struct cifsFileInfo *cifs_file)
543 spin_lock(&cifs_file->file_info_lock);
544 cifsFileInfo_get_locked(cifs_file);
545 spin_unlock(&cifs_file->file_info_lock);
546 return cifs_file;
549 static void cifsFileInfo_put_final(struct cifsFileInfo *cifs_file)
551 struct inode *inode = d_inode(cifs_file->dentry);
561 list_for_each_entry_safe(li, tmp, &cifs_file->llist->locks, llist) {
566 list_del(&cifs_file->llist->llist);
567 kfree(cifs_file->llist);
570 cifs_put_tlink(cifs_file->tlink);
571 dput(cifs_file->dentry);
573 kfree(cifs_file->symlink_target);
574 kfree(cifs_file);
579 struct cifsFileInfo *cifs_file = container_of(work,
582 cifsFileInfo_put_final(cifs_file);
590 * @cifs_file: cifs/smb3 specific info (eg refcounts) for an open file
592 void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
594 _cifsFileInfo_put(cifs_file, true, true);
600 * This may involve closing the filehandle @cifs_file out on the
602 * cinode->open_file_lock and cifs_file->file_info_lock.
608 * @cifs_file: cifs/smb3 specific info (eg refcounts) for an open file
613 void _cifsFileInfo_put(struct cifsFileInfo *cifs_file,
616 struct inode *inode = d_inode(cifs_file->dentry);
617 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
628 spin_lock(&cifs_file->file_info_lock);
629 if (--cifs_file->count > 0) {
630 spin_unlock(&cifs_file->file_info_lock);
635 spin_unlock(&cifs_file->file_info_lock);
641 cifs_add_pending_open_locked(&fid, cifs_file->tlink, &open);
644 list_del(&cifs_file->flist);
645 list_del(&cifs_file->tlist);
650 d_inode(cifs_file->dentry));
665 cancel_work_sync(&cifs_file->oplock_break) : false;
667 if (!tcon->need_reconnect && !cifs_file->invalidHandle) {
673 server->ops->close_getattr(xid, tcon, cifs_file);
675 server->ops->close(xid, tcon, &cifs_file->fid);
685 queue_work(fileinfo_put_wq, &cifs_file->put);
687 cifsFileInfo_put_final(cifs_file);