Skip to content

Commit

Permalink
NFS: Clean up extra dprintk()s in client.c
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Schumaker <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
amschuma-ntap authored and trondmypd committed Apr 20, 2017
1 parent 2844b6a commit 4cbb976
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ static void pnfs_init_server(struct nfs_server *server)
*/
void nfs_free_client(struct nfs_client *clp)
{
dprintk("--> nfs_free_client(%u)\n", clp->rpc_ops->version);

nfs_fscache_release_client_cookie(clp);

/* -EIO all pending I/O */
Expand All @@ -256,8 +254,6 @@ void nfs_free_client(struct nfs_client *clp)
kfree(clp->cl_hostname);
kfree(clp->cl_acceptor);
kfree(clp);

dprintk("<-- nfs_free_client()\n");
}
EXPORT_SYMBOL_GPL(nfs_free_client);

Expand All @@ -271,7 +267,6 @@ void nfs_put_client(struct nfs_client *clp)
if (!clp)
return;

dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count));
nn = net_generic(clp->cl_net, nfs_net_id);

if (atomic_dec_and_lock(&clp->cl_count, &nn->nfs_client_lock)) {
Expand Down Expand Up @@ -382,9 +377,6 @@ nfs_found_client(const struct nfs_client_initdata *cl_init,
}

smp_rmb();

dprintk("<-- %s found nfs_client %p for %s\n",
__func__, clp, cl_init->hostname ?: "");
return clp;
}

Expand All @@ -403,9 +395,6 @@ struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_init)
return NULL;
}

dprintk("--> nfs_get_client(%s,v%u)\n",
cl_init->hostname, rpc_ops->version);

/* see if the client already exists */
do {
spin_lock(&nn->nfs_client_lock);
Expand All @@ -430,8 +419,6 @@ struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_init)
new = rpc_ops->alloc_client(cl_init);
} while (!IS_ERR(new));

dprintk("<-- nfs_get_client() Failed to find %s (%ld)\n",
cl_init->hostname, PTR_ERR(new));
return new;
}
EXPORT_SYMBOL_GPL(nfs_get_client);
Expand Down Expand Up @@ -662,19 +649,15 @@ static int nfs_init_server(struct nfs_server *server,
struct nfs_client *clp;
int error;

dprintk("--> nfs_init_server()\n");

nfs_init_timeout_values(&timeparms, data->nfs_server.protocol,
data->timeo, data->retrans);
if (data->flags & NFS_MOUNT_NORESVPORT)
set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);

/* Allocate or find a client reference we can use */
clp = nfs_get_client(&cl_init);
if (IS_ERR(clp)) {
dprintk("<-- nfs_init_server() = error %ld\n", PTR_ERR(clp));
if (IS_ERR(clp))
return PTR_ERR(clp);
}

server->nfs_client = clp;

Expand Down Expand Up @@ -719,13 +702,11 @@ static int nfs_init_server(struct nfs_server *server,
server->mountd_protocol = data->mount_server.protocol;

server->namelen = data->namlen;
dprintk("<-- nfs_init_server() = 0 [new %p]\n", clp);
return 0;

error:
server->nfs_client = NULL;
nfs_put_client(clp);
dprintk("<-- nfs_init_server() = xerror %d\n", error);
return error;
}

Expand Down Expand Up @@ -795,20 +776,18 @@ int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs
struct nfs_client *clp = server->nfs_client;
int error;

dprintk("--> nfs_probe_fsinfo()\n");

if (clp->rpc_ops->set_capabilities != NULL) {
error = clp->rpc_ops->set_capabilities(server, mntfh);
if (error < 0)
goto out_error;
return error;
}

fsinfo.fattr = fattr;
fsinfo.nlayouttypes = 0;
memset(fsinfo.layouttype, 0, sizeof(fsinfo.layouttype));
error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
if (error < 0)
goto out_error;
return error;

nfs_server_set_fsinfo(server, &fsinfo);

Expand All @@ -823,12 +802,7 @@ int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs
server->namelen = pathinfo.max_namelen;
}

dprintk("<-- nfs_probe_fsinfo() = 0\n");
return 0;

out_error:
dprintk("nfs_probe_fsinfo: error = %d\n", -error);
return error;
}
EXPORT_SYMBOL_GPL(nfs_probe_fsinfo);

Expand Down Expand Up @@ -930,8 +904,6 @@ EXPORT_SYMBOL_GPL(nfs_alloc_server);
*/
void nfs_free_server(struct nfs_server *server)
{
dprintk("--> nfs_free_server()\n");

nfs_server_remove_lists(server);

if (server->destroy != NULL)
Expand All @@ -950,7 +922,6 @@ void nfs_free_server(struct nfs_server *server)
bdi_destroy(&server->backing_dev_info);
kfree(server);
nfs_release_automount_timer();
dprintk("<-- nfs_free_server()\n");
}
EXPORT_SYMBOL_GPL(nfs_free_server);

Expand Down Expand Up @@ -1030,10 +1001,6 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
struct nfs_fattr *fattr_fsinfo;
int error;

dprintk("--> nfs_clone_server(,%llx:%llx,)\n",
(unsigned long long) fattr->fsid.major,
(unsigned long long) fattr->fsid.minor);

server = nfs_alloc_server();
if (!server)
return ERR_PTR(-ENOMEM);
Expand Down Expand Up @@ -1065,10 +1032,6 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN)
server->namelen = NFS4_MAXNAMLEN;

dprintk("Cloned FSID: %llx:%llx\n",
(unsigned long long) server->fsid.major,
(unsigned long long) server->fsid.minor);

error = nfs_start_lockd(server);
if (error < 0)
goto out_free_server;
Expand All @@ -1077,13 +1040,11 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
server->mount_time = jiffies;

nfs_free_fattr(fattr_fsinfo);
dprintk("<-- nfs_clone_server() = %p\n", server);
return server;

out_free_server:
nfs_free_fattr(fattr_fsinfo);
nfs_free_server(server);
dprintk("<-- nfs_clone_server() = error %d\n", error);
return ERR_PTR(error);
}
EXPORT_SYMBOL_GPL(nfs_clone_server);
Expand Down

0 comments on commit 4cbb976

Please sign in to comment.