]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup
authorzhengbin <zhengbin13@huawei.com>
Thu, 19 Dec 2019 06:14:18 +0000 (14:14 +0800)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:31 +0000 (10:54 -0500)
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 <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs3proc.c

index 657041c3a03f6ffd8d4cccd829c6864d8bfa400a..67a05f35bb89a71e87f4cf513468637dbc663707 100644 (file)
@@ -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);