From: Xu Wang Date: Tue, 3 Mar 2020 10:30:52 +0000 (+0800) Subject: NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup X-Git-Tag: v5.15~3607^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00a7a00e2d2fc2ebbaf2c3ef25427ae13e0f94da;p=platform%2Fkernel%2Flinux-starfive.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. Signed-off-by: Xu Wang Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index a46d1d5..2397cee 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -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);