aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/smb2ops.c')
-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 = {