[PATCH 6/7] cifs: Avoid a cast in add_durable_reconnect_v2_context()

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

 



We have the correctly-typed struct smb2_create_req * available in the
caller.

Signed-off-by: Volker Lendecke <vl@xxxxxxxxx>
---
 fs/cifs/smb2pdu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 6d4a14efa79f..9e9267da28a2 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -2261,10 +2261,10 @@ add_durable_v2_context(struct smb2_create_req *req,
 }
 
 static int
-add_durable_reconnect_v2_context(struct kvec *iov, unsigned int *num_iovec,
+add_durable_reconnect_v2_context(struct smb2_create_req *req,
+				 struct kvec *iov, unsigned int *num_iovec,
 		    struct cifs_open_parms *oparms)
 {
-	struct smb2_create_req *req = iov[0].iov_base;
 	unsigned int num = *num_iovec;
 
 	/* indicate that we don't need to relock the file */
@@ -2293,7 +2293,8 @@ add_durable_context(struct smb2_create_req *req,
 
 	if (use_persistent) {
 		if (oparms->reconnect)
-			return add_durable_reconnect_v2_context(iov, num_iovec,
+			return add_durable_reconnect_v2_context(req,
+								iov, num_iovec,
 								oparms);
 		else
 			return add_durable_v2_context(req, iov, num_iovec,
-- 
2.30.2




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux