@@ -233,6 +233,7 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,
233233 * @namesz: The strlen of the cell name.
234234 * @vllist: A colon/comma separated list of numeric IP addresses or NULL.
235235 * @excl: T if an error should be given if the cell name already exists.
236+ * @trace: The reason to be logged if the lookup is successful.
236237 *
237238 * Look up a cell record by name and query the DNS for VL server addresses if
238239 * needed. Note that that actual DNS query is punted off to the manager thread
@@ -241,7 +242,8 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net,
241242 */
242243struct afs_cell * afs_lookup_cell (struct afs_net * net ,
243244 const char * name , unsigned int namesz ,
244- const char * vllist , bool excl )
245+ const char * vllist , bool excl ,
246+ enum afs_cell_trace trace )
245247{
246248 struct afs_cell * cell , * candidate , * cursor ;
247249 struct rb_node * parent , * * pp ;
@@ -251,7 +253,7 @@ struct afs_cell *afs_lookup_cell(struct afs_net *net,
251253 _enter ("%s,%s" , name , vllist );
252254
253255 if (!excl ) {
254- cell = afs_find_cell (net , name , namesz , afs_cell_trace_use_lookup );
256+ cell = afs_find_cell (net , name , namesz , trace );
255257 if (!IS_ERR (cell ))
256258 goto wait_for_cell ;
257259 }
@@ -327,7 +329,7 @@ struct afs_cell *afs_lookup_cell(struct afs_net *net,
327329 if (excl ) {
328330 ret = - EEXIST ;
329331 } else {
330- afs_use_cell (cursor , afs_cell_trace_use_lookup );
332+ afs_use_cell (cursor , trace );
331333 ret = 0 ;
332334 }
333335 up_write (& net -> cells_lock );
@@ -382,8 +384,9 @@ int afs_cell_init(struct afs_net *net, const char *rootcell)
382384 if (cp && cp < rootcell + len )
383385 return - EINVAL ;
384386
385- /* allocate a cell record for the root cell */
386- new_root = afs_lookup_cell (net , rootcell , len , vllist , false);
387+ /* allocate a cell record for the root/workstation cell */
388+ new_root = afs_lookup_cell (net , rootcell , len , vllist , false,
389+ afs_cell_trace_use_lookup_ws );
387390 if (IS_ERR (new_root )) {
388391 _leave (" = %ld" , PTR_ERR (new_root ));
389392 return PTR_ERR (new_root );
0 commit comments