@@ -2734,13 +2734,10 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
27342734 goto err_free_req ;
27352735 }
27362736
2737- trace_smb3_posix_mkdir_done (xid , le64_to_cpu (rsp -> PersistentFileId ),
2738- tcon -> tid ,
2739- ses -> Suid , CREATE_NOT_FILE ,
2740- FILE_WRITE_ATTRIBUTES );
2737+ trace_smb3_posix_mkdir_done (xid , rsp -> PersistentFileId , tcon -> tid , ses -> Suid ,
2738+ CREATE_NOT_FILE , FILE_WRITE_ATTRIBUTES );
27412739
2742- SMB2_close (xid , tcon , le64_to_cpu (rsp -> PersistentFileId ),
2743- le64_to_cpu (rsp -> VolatileFileId ));
2740+ SMB2_close (xid , tcon , rsp -> PersistentFileId , rsp -> VolatileFileId );
27442741
27452742 /* Eventually save off posix specific response info and timestaps */
27462743
@@ -3009,14 +3006,12 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
30093006 } else if (rsp == NULL ) /* unlikely to happen, but safer to check */
30103007 goto creat_exit ;
30113008 else
3012- trace_smb3_open_done (xid , le64_to_cpu (rsp -> PersistentFileId ),
3013- tcon -> tid ,
3014- ses -> Suid , oparms -> create_options ,
3015- oparms -> desired_access );
3009+ trace_smb3_open_done (xid , rsp -> PersistentFileId , tcon -> tid , ses -> Suid ,
3010+ oparms -> create_options , oparms -> desired_access );
30163011
30173012 atomic_inc (& tcon -> num_remote_opens );
3018- oparms -> fid -> persistent_fid = le64_to_cpu ( rsp -> PersistentFileId ) ;
3019- oparms -> fid -> volatile_fid = le64_to_cpu ( rsp -> VolatileFileId ) ;
3013+ oparms -> fid -> persistent_fid = rsp -> PersistentFileId ;
3014+ oparms -> fid -> volatile_fid = rsp -> VolatileFileId ;
30203015 oparms -> fid -> access = oparms -> desired_access ;
30213016#ifdef CONFIG_CIFS_DEBUG2
30223017 oparms -> fid -> mid = le64_to_cpu (rsp -> hdr .MessageId );
@@ -3313,8 +3308,8 @@ SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
33133308 if (rc )
33143309 return rc ;
33153310
3316- req -> PersistentFileId = cpu_to_le64 ( persistent_fid ) ;
3317- req -> VolatileFileId = cpu_to_le64 ( volatile_fid ) ;
3311+ req -> PersistentFileId = persistent_fid ;
3312+ req -> VolatileFileId = volatile_fid ;
33183313 if (query_attrs )
33193314 req -> Flags = SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB ;
33203315 else
@@ -3677,8 +3672,8 @@ SMB2_notify_init(const unsigned int xid, struct smb_rqst *rqst,
36773672 if (rc )
36783673 return rc ;
36793674
3680- req -> PersistentFileId = cpu_to_le64 ( persistent_fid ) ;
3681- req -> VolatileFileId = cpu_to_le64 ( volatile_fid ) ;
3675+ req -> PersistentFileId = persistent_fid ;
3676+ req -> VolatileFileId = volatile_fid ;
36823677 /* See note 354 of MS-SMB2, 64K max */
36833678 req -> OutputBufferLength =
36843679 cpu_to_le32 (SMB2_MAX_BUFFER_SIZE - MAX_SMB2_HDR_SIZE );
@@ -3951,8 +3946,8 @@ SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst,
39513946 if (rc )
39523947 return rc ;
39533948
3954- req -> PersistentFileId = cpu_to_le64 ( persistent_fid ) ;
3955- req -> VolatileFileId = cpu_to_le64 ( volatile_fid ) ;
3949+ req -> PersistentFileId = persistent_fid ;
3950+ req -> VolatileFileId = volatile_fid ;
39563951
39573952 iov [0 ].iov_base = (char * )req ;
39583953 iov [0 ].iov_len = total_len ;
@@ -4033,8 +4028,8 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
40334028 shdr = & req -> hdr ;
40344029 shdr -> Id .SyncId .ProcessId = cpu_to_le32 (io_parms -> pid );
40354030
4036- req -> PersistentFileId = cpu_to_le64 ( io_parms -> persistent_fid ) ;
4037- req -> VolatileFileId = cpu_to_le64 ( io_parms -> volatile_fid ) ;
4031+ req -> PersistentFileId = io_parms -> persistent_fid ;
4032+ req -> VolatileFileId = io_parms -> volatile_fid ;
40384033 req -> ReadChannelInfoOffset = 0 ; /* reserved */
40394034 req -> ReadChannelInfoLength = 0 ; /* reserved */
40404035 req -> Channel = 0 ; /* reserved */
@@ -4094,8 +4089,8 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
40944089 */
40954090 shdr -> SessionId = cpu_to_le64 (0xFFFFFFFFFFFFFFFF );
40964091 shdr -> Id .SyncId .TreeId = cpu_to_le32 (0xFFFFFFFF );
4097- req -> PersistentFileId = cpu_to_le64 ( 0xFFFFFFFFFFFFFFFF ) ;
4098- req -> VolatileFileId = cpu_to_le64 ( 0xFFFFFFFFFFFFFFFF ) ;
4092+ req -> PersistentFileId = ( u64 ) - 1 ;
4093+ req -> VolatileFileId = ( u64 ) - 1 ;
40994094 }
41004095 }
41014096 if (remaining_bytes > io_parms -> length )
@@ -4307,21 +4302,19 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
43074302 cifs_stats_fail_inc (io_parms -> tcon , SMB2_READ_HE );
43084303 cifs_dbg (VFS , "Send error in read = %d\n" , rc );
43094304 trace_smb3_read_err (xid ,
4310- le64_to_cpu ( req -> PersistentFileId ) ,
4305+ req -> PersistentFileId ,
43114306 io_parms -> tcon -> tid , ses -> Suid ,
43124307 io_parms -> offset , io_parms -> length ,
43134308 rc );
43144309 } else
4315- trace_smb3_read_done (xid ,
4316- le64_to_cpu (req -> PersistentFileId ),
4317- io_parms -> tcon -> tid , ses -> Suid ,
4318- io_parms -> offset , 0 );
4310+ trace_smb3_read_done (xid , req -> PersistentFileId , io_parms -> tcon -> tid ,
4311+ ses -> Suid , io_parms -> offset , 0 );
43194312 free_rsp_buf (resp_buftype , rsp_iov .iov_base );
43204313 cifs_small_buf_release (req );
43214314 return rc == - ENODATA ? 0 : rc ;
43224315 } else
43234316 trace_smb3_read_done (xid ,
4324- le64_to_cpu ( req -> PersistentFileId ) ,
4317+ req -> PersistentFileId ,
43254318 io_parms -> tcon -> tid , ses -> Suid ,
43264319 io_parms -> offset , io_parms -> length );
43274320
@@ -4463,8 +4456,8 @@ smb2_async_writev(struct cifs_writedata *wdata,
44634456 shdr = (struct smb2_hdr * )req ;
44644457 shdr -> Id .SyncId .ProcessId = cpu_to_le32 (wdata -> cfile -> pid );
44654458
4466- req -> PersistentFileId = cpu_to_le64 ( wdata -> cfile -> fid .persistent_fid ) ;
4467- req -> VolatileFileId = cpu_to_le64 ( wdata -> cfile -> fid .volatile_fid ) ;
4459+ req -> PersistentFileId = wdata -> cfile -> fid .persistent_fid ;
4460+ req -> VolatileFileId = wdata -> cfile -> fid .volatile_fid ;
44684461 req -> WriteChannelInfoOffset = 0 ;
44694462 req -> WriteChannelInfoLength = 0 ;
44704463 req -> Channel = 0 ;
@@ -4562,7 +4555,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
45624555
45634556 if (rc ) {
45644557 trace_smb3_write_err (0 /* no xid */ ,
4565- le64_to_cpu ( req -> PersistentFileId ) ,
4558+ req -> PersistentFileId ,
45664559 tcon -> tid , tcon -> ses -> Suid , wdata -> offset ,
45674560 wdata -> bytes , rc );
45684561 kref_put (& wdata -> refcount , release );
@@ -4615,8 +4608,8 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
46154608
46164609 req -> hdr .Id .SyncId .ProcessId = cpu_to_le32 (io_parms -> pid );
46174610
4618- req -> PersistentFileId = cpu_to_le64 ( io_parms -> persistent_fid ) ;
4619- req -> VolatileFileId = cpu_to_le64 ( io_parms -> volatile_fid ) ;
4611+ req -> PersistentFileId = io_parms -> persistent_fid ;
4612+ req -> VolatileFileId = io_parms -> volatile_fid ;
46204613 req -> WriteChannelInfoOffset = 0 ;
46214614 req -> WriteChannelInfoLength = 0 ;
46224615 req -> Channel = 0 ;
@@ -4645,7 +4638,7 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
46454638
46464639 if (rc ) {
46474640 trace_smb3_write_err (xid ,
4648- le64_to_cpu ( req -> PersistentFileId ) ,
4641+ req -> PersistentFileId ,
46494642 io_parms -> tcon -> tid ,
46504643 io_parms -> tcon -> ses -> Suid ,
46514644 io_parms -> offset , io_parms -> length , rc );
@@ -4654,7 +4647,7 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
46544647 } else {
46554648 * nbytes = le32_to_cpu (rsp -> DataLength );
46564649 trace_smb3_write_done (xid ,
4657- le64_to_cpu ( req -> PersistentFileId ) ,
4650+ req -> PersistentFileId ,
46584651 io_parms -> tcon -> tid ,
46594652 io_parms -> tcon -> ses -> Suid ,
46604653 io_parms -> offset , * nbytes );
0 commit comments