diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsfs.c | 8 | ||||
-rw-r--r-- | fs/cifs/cifspdu.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifsproto.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 13 | ||||
-rw-r--r-- | fs/cifs/ioctl.c | 1 |
5 files changed, 15 insertions, 11 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 5082fce3c566..ae48ef042977 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -559,6 +559,10 @@ struct file_operations cifs_file_ops = { | |||
559 | .flush = cifs_flush, | 559 | .flush = cifs_flush, |
560 | .mmap = cifs_file_mmap, | 560 | .mmap = cifs_file_mmap, |
561 | .sendfile = generic_file_sendfile, | 561 | .sendfile = generic_file_sendfile, |
562 | #ifdef CONFIG_CIFS_POSIX | ||
563 | .ioctl = cifs_ioctl, | ||
564 | #endif /* CONFIG_CIFS_POSIX */ | ||
565 | |||
562 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 566 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
563 | .readv = generic_file_readv, | 567 | .readv = generic_file_readv, |
564 | .writev = generic_file_writev, | 568 | .writev = generic_file_writev, |
@@ -579,6 +583,10 @@ struct file_operations cifs_file_direct_ops = { | |||
579 | .fsync = cifs_fsync, | 583 | .fsync = cifs_fsync, |
580 | .flush = cifs_flush, | 584 | .flush = cifs_flush, |
581 | .sendfile = generic_file_sendfile, /* BB removeme BB */ | 585 | .sendfile = generic_file_sendfile, /* BB removeme BB */ |
586 | #ifdef CONFIG_CIFS_POSIX | ||
587 | .ioctl = cifs_ioctl, | ||
588 | #endif /* CONFIG_CIFS_POSIX */ | ||
589 | |||
582 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 590 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
583 | .dir_notify = cifs_dir_notify, | 591 | .dir_notify = cifs_dir_notify, |
584 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 592 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 085109d2b55e..5b352890f092 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h | |||
@@ -1258,10 +1258,8 @@ struct smb_t2_qfi_req { | |||
1258 | struct smb_hdr hdr; | 1258 | struct smb_hdr hdr; |
1259 | struct trans2_req t2; | 1259 | struct trans2_req t2; |
1260 | __u8 Pad; | 1260 | __u8 Pad; |
1261 | __u16 Pad1; | ||
1262 | __u16 Fid; | 1261 | __u16 Fid; |
1263 | __le16 InformationLevel; | 1262 | __le16 InformationLevel; |
1264 | __u16 Pad2; | ||
1265 | }; | 1263 | }; |
1266 | 1264 | ||
1267 | struct smb_t2_qfi_rsp { | 1265 | struct smb_t2_qfi_rsp { |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 82ae59d7cf9d..1b0070dfc51c 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -266,6 +266,4 @@ extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, | |||
266 | const struct nls_table *nls_codepage); | 266 | const struct nls_table *nls_codepage); |
267 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, | 267 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, |
268 | const int netfid, __u64 * pExtAttrBits, __u64 *pMask); | 268 | const int netfid, __u64 * pExtAttrBits, __u64 *pMask); |
269 | extern int cifs_ioctl (struct inode * inode, struct file * filep, | ||
270 | unsigned int command, unsigned long arg); | ||
271 | #endif /* _CIFSPROTO_H */ | 269 | #endif /* _CIFSPROTO_H */ |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 36d3c128a58b..237e3bf94bfe 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2093,9 +2093,9 @@ GetExtAttrRetry: | |||
2093 | if (rc) | 2093 | if (rc) |
2094 | return rc; | 2094 | return rc; |
2095 | 2095 | ||
2096 | params = 2 /* level */ +2 /* fid */ + 2 /* rsrvd */; | 2096 | params = 2 /* level */ +2 /* fid */; |
2097 | pSMB->t2.TotalDataCount = 0; | 2097 | pSMB->t2.TotalDataCount = 0; |
2098 | pSMB->t2.MaxParameterCount = cpu_to_le16(2); | 2098 | pSMB->t2.MaxParameterCount = cpu_to_le16(4); |
2099 | /* BB find exact max data count below from sess structure BB */ | 2099 | /* BB find exact max data count below from sess structure BB */ |
2100 | pSMB->t2.MaxDataCount = cpu_to_le16(4000); | 2100 | pSMB->t2.MaxDataCount = cpu_to_le16(4000); |
2101 | pSMB->t2.MaxSetupCount = 0; | 2101 | pSMB->t2.MaxSetupCount = 0; |
@@ -2103,19 +2103,18 @@ GetExtAttrRetry: | |||
2103 | pSMB->t2.Flags = 0; | 2103 | pSMB->t2.Flags = 0; |
2104 | pSMB->t2.Timeout = 0; | 2104 | pSMB->t2.Timeout = 0; |
2105 | pSMB->t2.Reserved2 = 0; | 2105 | pSMB->t2.Reserved2 = 0; |
2106 | pSMB->t2.ParameterOffset = cpu_to_le16(offsetof( | 2106 | pSMB->t2.ParameterOffset = cpu_to_le16(offsetof(struct smb_t2_qfi_req, |
2107 | struct smb_com_transaction2_qpi_req ,InformationLevel) - 4); | 2107 | Fid) - 4); |
2108 | pSMB->t2.DataCount = 0; | 2108 | pSMB->t2.DataCount = 0; |
2109 | pSMB->t2.DataOffset = 0; | 2109 | pSMB->t2.DataOffset = 0; |
2110 | pSMB->t2.SetupCount = 1; | 2110 | pSMB->t2.SetupCount = 1; |
2111 | pSMB->t2.Reserved3 = 0; | 2111 | pSMB->t2.Reserved3 = 0; |
2112 | pSMB->t2.SubCommand = cpu_to_le16(TRANS2_QUERY_FILE_INFORMATION); | 2112 | pSMB->t2.SubCommand = cpu_to_le16(TRANS2_QUERY_FILE_INFORMATION); |
2113 | byte_count = params + 3 /* pad */ ; | 2113 | byte_count = params + 1 /* pad */ ; |
2114 | pSMB->t2.TotalParameterCount = cpu_to_le16(params); | 2114 | pSMB->t2.TotalParameterCount = cpu_to_le16(params); |
2115 | pSMB->t2.ParameterCount = pSMB->t2.TotalParameterCount; | 2115 | pSMB->t2.ParameterCount = pSMB->t2.TotalParameterCount; |
2116 | pSMB->InformationLevel = cpu_to_le16(SMB_QUERY_ATTR_FLAGS); | 2116 | pSMB->InformationLevel = cpu_to_le16(SMB_QUERY_ATTR_FLAGS); |
2117 | pSMB->Pad1 = 0; | 2117 | pSMB->Pad = 0; |
2118 | pSMB->Pad2 = 0; | ||
2119 | pSMB->Fid = netfid; | 2118 | pSMB->Fid = netfid; |
2120 | pSMB->hdr.smb_buf_length += byte_count; | 2119 | pSMB->hdr.smb_buf_length += byte_count; |
2121 | pSMB->t2.ByteCount = cpu_to_le16(byte_count); | 2120 | pSMB->t2.ByteCount = cpu_to_le16(byte_count); |
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 7b84b2bb8c4a..a4f1c34a8dc7 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "cifsglob.h" | 27 | #include "cifsglob.h" |
28 | #include "cifsproto.h" | 28 | #include "cifsproto.h" |
29 | #include "cifs_debug.h" | 29 | #include "cifs_debug.h" |
30 | #include "cifsfs.h" | ||
30 | 31 | ||
31 | int cifs_ioctl (struct inode * inode, struct file * filep, | 32 | int cifs_ioctl (struct inode * inode, struct file * filep, |
32 | unsigned int command, unsigned long arg) | 33 | unsigned int command, unsigned long arg) |