aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c621ffa2ca90..ced8eaa9d37d 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -5013,10 +5013,9 @@ SetAttrLgcyRetry:
5013#endif /* temporarily unneeded SetAttr legacy function */ 5013#endif /* temporarily unneeded SetAttr legacy function */
5014 5014
5015int 5015int
5016CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon, 5016CIFSSMBUnixSetInfo(const int xid, struct cifsTconInfo *tcon, char *fileName,
5017 char *fileName, __u64 mode, __u64 uid, __u64 gid, 5017 const struct cifs_unix_set_info_args *args,
5018 dev_t device, const struct nls_table *nls_codepage, 5018 const struct nls_table *nls_codepage, int remap)
5019 int remap)
5020{ 5019{
5021 TRANSACTION2_SPI_REQ *pSMB = NULL; 5020 TRANSACTION2_SPI_REQ *pSMB = NULL;
5022 TRANSACTION2_SPI_RSP *pSMBr = NULL; 5021 TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -5025,6 +5024,7 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
5025 int bytes_returned = 0; 5024 int bytes_returned = 0;
5026 FILE_UNIX_BASIC_INFO *data_offset; 5025 FILE_UNIX_BASIC_INFO *data_offset;
5027 __u16 params, param_offset, offset, count, byte_count; 5026 __u16 params, param_offset, offset, count, byte_count;
5027 __u64 mode = args->mode;
5028 5028
5029 cFYI(1, ("In SetUID/GID/Mode")); 5029 cFYI(1, ("In SetUID/GID/Mode"));
5030setPermsRetry: 5030setPermsRetry:
@@ -5080,16 +5080,16 @@ setPermsRetry:
5080 set file size and do not want to truncate file size to zero 5080 set file size and do not want to truncate file size to zero
5081 accidently as happened on one Samba server beta by putting 5081 accidently as happened on one Samba server beta by putting
5082 zero instead of -1 here */ 5082 zero instead of -1 here */
5083 data_offset->EndOfFile = NO_CHANGE_64; 5083 data_offset->EndOfFile = cpu_to_le64(NO_CHANGE_64);
5084 data_offset->NumOfBytes = NO_CHANGE_64; 5084 data_offset->NumOfBytes = cpu_to_le64(NO_CHANGE_64);
5085 data_offset->LastStatusChange = NO_CHANGE_64; 5085 data_offset->LastStatusChange = cpu_to_le64(args->ctime);
5086 data_offset->LastAccessTime = NO_CHANGE_64; 5086 data_offset->LastAccessTime = cpu_to_le64(args->atime);
5087 data_offset->LastModificationTime = NO_CHANGE_64; 5087 data_offset->LastModificationTime = cpu_to_le64(args->mtime);
5088 data_offset->Uid = cpu_to_le64(uid); 5088 data_offset->Uid = cpu_to_le64(args->uid);
5089 data_offset->Gid = cpu_to_le64(gid); 5089 data_offset->Gid = cpu_to_le64(args->gid);
5090 /* better to leave device as zero when it is */ 5090 /* better to leave device as zero when it is */
5091 data_offset->DevMajor = cpu_to_le64(MAJOR(device)); 5091 data_offset->DevMajor = cpu_to_le64(MAJOR(args->device));
5092 data_offset->DevMinor = cpu_to_le64(MINOR(device)); 5092 data_offset->DevMinor = cpu_to_le64(MINOR(args->device));
5093 data_offset->Permissions = cpu_to_le64(mode); 5093 data_offset->Permissions = cpu_to_le64(mode);
5094 5094
5095 if (S_ISREG(mode)) 5095 if (S_ISREG(mode))