From: zhengbin Date: Thu, 19 Dec 2019 06:14:18 +0000 (+0800) Subject: NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup X-Git-Tag: v5.6-rc1~29^2~59 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6ed2144a80ebd9e40fa15a369f5528bafbc9b50d;p=users%2Fjedix%2Flinux-maple.git 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 --- 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);