aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-05-27 12:44:23 -0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 13:55:11 -0400
commit25e266320caca88a4463385b6f4ef696111d2c9a (patch)
treeb958613391ff19352b6912ba8a657bddb7da47b0 /fs/cifs
parent9224dfc2f92f4faff7b3d9e169255278129b47e8 (diff)
CIFS: Add SMB2 support for build_path_to_root
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2ops.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index bcf310c8b784..2f9950e43911 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -190,6 +190,23 @@ smb2_get_srv_inum(const unsigned int xid, struct cifs_tcon *tcon,
190 return 0; 190 return 0;
191} 191}
192 192
193static char *
194smb2_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
195 struct cifs_tcon *tcon)
196{
197 int pplen = vol->prepath ? strlen(vol->prepath) : 0;
198 char *full_path = NULL;
199
200 /* if no prefix path, simply set path to the root of share to "" */
201 if (pplen == 0) {
202 full_path = kzalloc(2, GFP_KERNEL);
203 return full_path;
204 }
205
206 cERROR(1, "prefixpath is not supported for SMB2 now");
207 return NULL;
208}
209
193struct smb_version_operations smb21_operations = { 210struct smb_version_operations smb21_operations = {
194 .setup_request = smb2_setup_request, 211 .setup_request = smb2_setup_request,
195 .check_receive = smb2_check_receive, 212 .check_receive = smb2_check_receive,
@@ -210,6 +227,7 @@ struct smb_version_operations smb21_operations = {
210 .is_path_accessible = smb2_is_path_accessible, 227 .is_path_accessible = smb2_is_path_accessible,
211 .query_path_info = smb2_query_path_info, 228 .query_path_info = smb2_query_path_info,
212 .get_srv_inum = smb2_get_srv_inum, 229 .get_srv_inum = smb2_get_srv_inum,
230 .build_path_to_root = smb2_build_path_to_root,
213}; 231};
214 232
215struct smb_version_values smb21_values = { 233struct smb_version_values smb21_values = {