diff options
-rw-r--r-- | fs/cifs/cifsproto.h | 5 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 11 | ||||
-rw-r--r-- | fs/cifs/inode.c | 11 |
3 files changed, 13 insertions, 14 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index eb2be992608d..a729d083e6f4 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -176,8 +176,9 @@ extern int CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, | |||
176 | const char *fileName, const FILE_BASIC_INFO *data, | 176 | const char *fileName, const FILE_BASIC_INFO *data, |
177 | const struct nls_table *nls_codepage, | 177 | const struct nls_table *nls_codepage, |
178 | int remap_special_chars); | 178 | int remap_special_chars); |
179 | extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | 179 | extern int CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, |
180 | const FILE_BASIC_INFO *data, __u16 fid); | 180 | const FILE_BASIC_INFO *data, __u16 fid, |
181 | __u32 pid_of_opener); | ||
181 | #if 0 | 182 | #if 0 |
182 | extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, | 183 | extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, |
183 | char *fileName, __u16 dos_attributes, | 184 | char *fileName, __u16 dos_attributes, |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index daf010a2ba80..6e8e8fc04c02 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -4816,8 +4816,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4816 | time and resort to the original setpathinfo level which takes the ancient | 4816 | time and resort to the original setpathinfo level which takes the ancient |
4817 | DOS time format with 2 second granularity */ | 4817 | DOS time format with 2 second granularity */ |
4818 | int | 4818 | int |
4819 | CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | 4819 | CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, |
4820 | const FILE_BASIC_INFO *data, __u16 fid) | 4820 | const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener) |
4821 | { | 4821 | { |
4822 | struct smb_com_transaction2_sfi_req *pSMB = NULL; | 4822 | struct smb_com_transaction2_sfi_req *pSMB = NULL; |
4823 | char *data_offset; | 4823 | char *data_offset; |
@@ -4830,11 +4830,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4830 | if (rc) | 4830 | if (rc) |
4831 | return rc; | 4831 | return rc; |
4832 | 4832 | ||
4833 | /* At this point there is no need to override the current pid | 4833 | pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); |
4834 | with the pid of the opener, but that could change if we someday | 4834 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); |
4835 | use an existing handle (rather than opening one on the fly) */ | ||
4836 | /* pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); | ||
4837 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16));*/ | ||
4838 | 4835 | ||
4839 | params = 6; | 4836 | params = 6; |
4840 | pSMB->MaxSetupCount = 0; | 4837 | pSMB->MaxSetupCount = 0; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 9d94afe9b60e..d952914dfc4c 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -767,9 +767,10 @@ psx_del_no_retry: | |||
767 | cifs_sb->mnt_cifs_flags & | 767 | cifs_sb->mnt_cifs_flags & |
768 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 768 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
769 | if (rc == 0) { | 769 | if (rc == 0) { |
770 | rc = CIFSSMBSetFileTimes(xid, pTcon, | 770 | rc = CIFSSMBSetFileInfo(xid, pTcon, |
771 | pinfo_buf, | 771 | pinfo_buf, |
772 | netfid); | 772 | netfid, |
773 | current->tgid); | ||
773 | CIFSSMBClose(xid, pTcon, netfid); | 774 | CIFSSMBClose(xid, pTcon, netfid); |
774 | } | 775 | } |
775 | } | 776 | } |
@@ -1702,8 +1703,8 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1702 | cifs_sb->mnt_cifs_flags & | 1703 | cifs_sb->mnt_cifs_flags & |
1703 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 1704 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
1704 | if (rc == 0) { | 1705 | if (rc == 0) { |
1705 | rc = CIFSSMBSetFileTimes(xid, pTcon, &time_buf, | 1706 | rc = CIFSSMBSetFileInfo(xid, pTcon, &time_buf, |
1706 | netfid); | 1707 | netfid, current->tgid); |
1707 | CIFSSMBClose(xid, pTcon, netfid); | 1708 | CIFSSMBClose(xid, pTcon, netfid); |
1708 | } else { | 1709 | } else { |
1709 | /* BB For even older servers we could convert time_buf | 1710 | /* BB For even older servers we could convert time_buf |