Lines Matching refs:vi

585 static void __vol_release(struct vol_info *vi)  in __vol_release()  argument
587 kfree(vi->fullpath); in __vol_release()
588 kfree(vi->mntdata); in __vol_release()
589 cifs_cleanup_volume_info_contents(&vi->smb_vol); in __vol_release()
590 kfree(vi); in __vol_release()
595 struct vol_info *vi = container_of(kref, struct vol_info, refcnt); in vol_release() local
598 list_del(&vi->list); in vol_release()
600 __vol_release(vi); in vol_release()
605 struct vol_info *vi, *nvi; in free_vol_list() local
607 list_for_each_entry_safe(vi, nvi, &vol_list, list) { in free_vol_list()
608 list_del_init(&vi->list); in free_vol_list()
609 __vol_release(vi); in free_vol_list()
1214 struct vol_info *vi; in dfs_cache_add_vol() local
1221 vi = kzalloc(sizeof(*vi), GFP_KERNEL); in dfs_cache_add_vol()
1222 if (!vi) in dfs_cache_add_vol()
1225 vi->fullpath = kstrndup(fullpath, strlen(fullpath), GFP_KERNEL); in dfs_cache_add_vol()
1226 if (!vi->fullpath) { in dfs_cache_add_vol()
1231 rc = dup_vol(vol, &vi->smb_vol); in dfs_cache_add_vol()
1235 vi->mntdata = mntdata; in dfs_cache_add_vol()
1236 spin_lock_init(&vi->smb_vol_lock); in dfs_cache_add_vol()
1237 kref_init(&vi->refcnt); in dfs_cache_add_vol()
1240 list_add_tail(&vi->list, &vol_list); in dfs_cache_add_vol()
1246 kfree(vi->fullpath); in dfs_cache_add_vol()
1248 kfree(vi); in dfs_cache_add_vol()
1255 struct vol_info *vi; in find_vol() local
1257 list_for_each_entry(vi, &vol_list, list) { in find_vol()
1258 cifs_dbg(FYI, "%s: vi->fullpath: %s\n", __func__, vi->fullpath); in find_vol()
1259 if (!strcasecmp(vi->fullpath, fullpath)) in find_vol()
1260 return vi; in find_vol()
1275 struct vol_info *vi; in dfs_cache_update_vol() local
1283 vi = find_vol(fullpath); in dfs_cache_update_vol()
1284 if (IS_ERR(vi)) { in dfs_cache_update_vol()
1286 return PTR_ERR(vi); in dfs_cache_update_vol()
1288 kref_get(&vi->refcnt); in dfs_cache_update_vol()
1292 spin_lock(&vi->smb_vol_lock); in dfs_cache_update_vol()
1293 memcpy(&vi->smb_vol.dstaddr, &server->dstaddr, in dfs_cache_update_vol()
1294 sizeof(vi->smb_vol.dstaddr)); in dfs_cache_update_vol()
1295 spin_unlock(&vi->smb_vol_lock); in dfs_cache_update_vol()
1297 kref_put(&vi->refcnt, vol_release); in dfs_cache_update_vol()
1309 struct vol_info *vi; in dfs_cache_del_vol() local
1317 vi = find_vol(fullpath); in dfs_cache_del_vol()
1320 kref_put(&vi->refcnt, vol_release); in dfs_cache_del_vol()
1468 static struct cifs_ses *find_root_ses(struct vol_info *vi, in find_root_ses() argument
1503 mdata = cifs_compose_mount_options(vi->mntdata, rpath, &ref, in find_root_ses()
1538 static int refresh_tcon(struct vol_info *vi, struct cifs_tcon *tcon) in refresh_tcon() argument
1574 ses = root_ses = find_root_ses(vi, tcon, npath); in refresh_tcon()
1609 struct vol_info *vi, *nvi; in refresh_cache_worker() local
1621 list_for_each_entry(vi, &vol_list, list) { in refresh_cache_worker()
1622 server = get_tcp_server(&vi->smb_vol); in refresh_cache_worker()
1626 kref_get(&vi->refcnt); in refresh_cache_worker()
1627 list_add_tail(&vi->rlist, &vols); in refresh_cache_worker()
1633 list_for_each_entry_safe(vi, nvi, &vols, rlist) { in refresh_cache_worker()
1634 spin_lock(&vi->smb_vol_lock); in refresh_cache_worker()
1635 server = get_tcp_server(&vi->smb_vol); in refresh_cache_worker()
1636 spin_unlock(&vi->smb_vol_lock); in refresh_cache_worker()
1650 rc = refresh_tcon(vi, tcon); in refresh_cache_worker()
1659 list_del_init(&vi->rlist); in refresh_cache_worker()
1660 kref_put(&vi->refcnt, vol_release); in refresh_cache_worker()