aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-18 19:20:27 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:26 -0400
commitb7546bc54c4acf1a79c83030fa0591cd24875125 (patch)
treea9fc588ec3a0075e08a33169d728b46e66617c21
parent4ad6504453644f57f7b6cf9c7bfc9d1372c5ad15 (diff)
CIFS: Add SMB2 support for query_file_info
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r--fs/cifs/smb2ops.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index eba12b31dc60..0fd580168252 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -190,6 +190,26 @@ smb2_get_srv_inum(const unsigned int xid, struct cifs_tcon *tcon,
190 return 0; 190 return 0;
191} 191}
192 192
193static int
194smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
195 struct cifs_fid *fid, FILE_ALL_INFO *data)
196{
197 int rc;
198 struct smb2_file_all_info *smb2_data;
199
200 smb2_data = kzalloc(sizeof(struct smb2_file_all_info) + MAX_NAME * 2,
201 GFP_KERNEL);
202 if (smb2_data == NULL)
203 return -ENOMEM;
204
205 rc = SMB2_query_info(xid, tcon, fid->persistent_fid, fid->volatile_fid,
206 smb2_data);
207 if (!rc)
208 move_smb2_info_to_cifs(data, smb2_data);
209 kfree(smb2_data);
210 return rc;
211}
212
193static char * 213static char *
194smb2_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, 214smb2_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
195 struct cifs_tcon *tcon) 215 struct cifs_tcon *tcon)
@@ -334,6 +354,7 @@ struct smb_version_operations smb21_operations = {
334 .echo = SMB2_echo, 354 .echo = SMB2_echo,
335 .query_path_info = smb2_query_path_info, 355 .query_path_info = smb2_query_path_info,
336 .get_srv_inum = smb2_get_srv_inum, 356 .get_srv_inum = smb2_get_srv_inum,
357 .query_file_info = smb2_query_file_info,
337 .build_path_to_root = smb2_build_path_to_root, 358 .build_path_to_root = smb2_build_path_to_root,
338 .mkdir = smb2_mkdir, 359 .mkdir = smb2_mkdir,
339 .mkdir_setinfo = smb2_mkdir_setinfo, 360 .mkdir_setinfo = smb2_mkdir_setinfo,