From 6ed2144a80ebd9e40fa15a369f5528bafbc9b50d Mon Sep 17 00:00:00 2001 From: zhengbin Date: Thu, 19 Dec 2019 14:14:18 +0800 Subject: 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. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Anna Schumaker --- fs/nfs/nfs3proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/nfs/nfs3proc.c') diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 657041c3a03f..67a05f35bb89 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -169,11 +169,11 @@ nfs3_proc_lookup(struct inode *dir, const struct qstr *name, }; int status; - dprintk("NFS call lookup %s\n", name->name); res.dir_attr = nfs_alloc_fattr(); if (res.dir_attr == NULL) return -ENOMEM; + dprintk("NFS call lookup %s\n", name->name); nfs_fattr_init(fattr); status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); nfs_refresh_inode(dir, res.dir_attr); -- cgit v1.2.3-59-g8ed1b