Skip to contentSkip to conversation

NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup

PATCH New Xu Wang 1 participant 1 message Mar 3, 2020

Subsystems (2)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup

In nfs3_proc_lookup, if nfs_alloc_fattr fails, will only print "NFS call lookup". This may be confusing, move dprintk after nfs_alloc_fattr.

---
 fs/nfs/nfs3proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfs3proc.c +1 -1
index a46d1d5d16d8..2397ceedba8a 100644
@@ -179,11 +179,11 @@ nfs3_proc_lookup(struct inode *dir, struct dentry *dentry,
 	if (nfs_lookup_is_soft_revalidate(dentry))
 		task_flags |= RPC_TASK_TIMEOUT;
 
-	dprintk("NFS call  lookup %pd2\n", dentry);
 	res.dir_attr = nfs_alloc_fattr();
 	if (res.dir_attr == NULL)
 		return -ENOMEM;
 
+	dprintk("NFS call  lookup %pd2\n", dentry);
 	nfs_fattr_init(fattr);
 	status = rpc_call_sync(NFS_CLIENT(dir), &msg, task_flags);
 	nfs_refresh_inode(dir, res.dir_attr);
Signature · 1 line
2.17.1