[PATCH 5/5] NFS: Combine nfs4_call_sync() with nfs4_call_sync_sequence()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>

The nfs4_call_sync_sequence() version only hase a single user,
nfs4_call_sync(), so let's just add in a call to nfs4_init_sequence()
instead of needing to have another function just to do this.

Signed-off-by: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
---
 fs/nfs/nfs4proc.c | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 505f605dcac2..99d77f6e7e40 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -993,11 +993,13 @@ static const struct rpc_call_ops nfs40_call_sync_ops = {
 	.rpc_call_done = nfs40_call_sync_done,
 };
 
-static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
-				   struct nfs_server *server,
-				   struct rpc_message *msg,
-				   struct nfs4_sequence_args *args,
-				   struct nfs4_sequence_res *res)
+int nfs4_call_sync(struct rpc_clnt *clnt,
+		   struct nfs_server *server,
+		   struct rpc_message *msg,
+		   struct nfs4_sequence_args *args,
+		   struct nfs4_sequence_res *res,
+		   int cache_reply,
+		   int privileged)
 {
 	int ret;
 	struct rpc_task *task;
@@ -1014,6 +1016,7 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
 		.callback_data = &data
 	};
 
+	nfs4_init_sequence(args, res, cache_reply, privileged);
 	task = rpc_run_task(&task_setup);
 	if (IS_ERR(task))
 		ret = PTR_ERR(task);
@@ -1024,18 +1027,6 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
 	return ret;
 }
 
-int nfs4_call_sync(struct rpc_clnt *clnt,
-		   struct nfs_server *server,
-		   struct rpc_message *msg,
-		   struct nfs4_sequence_args *args,
-		   struct nfs4_sequence_res *res,
-		   int cache_reply,
-		   int privileged)
-{
-	nfs4_init_sequence(args, res, cache_reply, privileged);
-	return nfs4_call_sync_sequence(clnt, server, msg, args, res);
-}
-
 static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo,
 		unsigned long timestamp)
 {
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux