Lines Matching refs:ret_buf
67 struct cifs_ses *ret_buf; in sesInfoAlloc() local
69 ret_buf = kzalloc(sizeof(struct cifs_ses), GFP_KERNEL); in sesInfoAlloc()
70 if (ret_buf) { in sesInfoAlloc()
72 spin_lock_init(&ret_buf->ses_lock); in sesInfoAlloc()
73 ret_buf->ses_status = SES_NEW; in sesInfoAlloc()
74 ++ret_buf->ses_count; in sesInfoAlloc()
75 INIT_LIST_HEAD(&ret_buf->smb_ses_list); in sesInfoAlloc()
76 INIT_LIST_HEAD(&ret_buf->tcon_list); in sesInfoAlloc()
77 mutex_init(&ret_buf->session_mutex); in sesInfoAlloc()
78 spin_lock_init(&ret_buf->iface_lock); in sesInfoAlloc()
79 INIT_LIST_HEAD(&ret_buf->iface_list); in sesInfoAlloc()
80 spin_lock_init(&ret_buf->chan_lock); in sesInfoAlloc()
82 return ret_buf; in sesInfoAlloc()
117 struct cifs_tcon *ret_buf; in tcon_info_alloc() local
120 ret_buf = kzalloc(sizeof(*ret_buf), GFP_KERNEL); in tcon_info_alloc()
121 if (!ret_buf) in tcon_info_alloc()
125 ret_buf->cfids = init_cached_dirs(); in tcon_info_alloc()
126 if (!ret_buf->cfids) { in tcon_info_alloc()
127 kfree(ret_buf); in tcon_info_alloc()
134 ret_buf->status = TID_NEW; in tcon_info_alloc()
135 ret_buf->debug_id = atomic_inc_return(&tcon_debug_id); in tcon_info_alloc()
136 ret_buf->tc_count = 1; in tcon_info_alloc()
137 spin_lock_init(&ret_buf->tc_lock); in tcon_info_alloc()
138 INIT_LIST_HEAD(&ret_buf->openFileList); in tcon_info_alloc()
139 INIT_LIST_HEAD(&ret_buf->tcon_list); in tcon_info_alloc()
140 INIT_LIST_HEAD(&ret_buf->cifs_sb_list); in tcon_info_alloc()
141 spin_lock_init(&ret_buf->open_file_lock); in tcon_info_alloc()
142 spin_lock_init(&ret_buf->stat_lock); in tcon_info_alloc()
143 spin_lock_init(&ret_buf->sb_list_lock); in tcon_info_alloc()
144 atomic_set(&ret_buf->num_local_opens, 0); in tcon_info_alloc()
145 atomic_set(&ret_buf->num_remote_opens, 0); in tcon_info_alloc()
146 ret_buf->stats_from_time = ktime_get_real_seconds(); in tcon_info_alloc()
148 mutex_init(&ret_buf->fscache_lock); in tcon_info_alloc()
150 trace_smb3_tcon_ref(ret_buf->debug_id, ret_buf->tc_count, trace); in tcon_info_alloc()
152 INIT_LIST_HEAD(&ret_buf->dfs_ses_list); in tcon_info_alloc()
154 INIT_LIST_HEAD(&ret_buf->pending_opens); in tcon_info_alloc()
155 INIT_DELAYED_WORK(&ret_buf->query_interfaces, in tcon_info_alloc()
158 INIT_DELAYED_WORK(&ret_buf->dfs_cache_work, dfs_cache_refresh); in tcon_info_alloc()
161 return ret_buf; in tcon_info_alloc()
183 struct smb_hdr *ret_buf = NULL; in cifs_buf_get() local
196 ret_buf = mempool_alloc(cifs_req_poolp, GFP_NOFS); in cifs_buf_get()
200 memset(ret_buf, 0, buf_size + 3); in cifs_buf_get()
206 return ret_buf; in cifs_buf_get()
225 struct smb_hdr *ret_buf = NULL; in cifs_small_buf_get() local
231 ret_buf = mempool_alloc(cifs_sm_req_poolp, GFP_NOFS); in cifs_small_buf_get()
239 return ret_buf; in cifs_small_buf_get()