Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339467
b: refs/heads/master
c: dd446b1
h: refs/heads/master
i:
  339465: 0b53f79
  339463: b13c7fb
v: v3
  • Loading branch information
Steve French committed Dec 5, 2012
1 parent 829d331 commit 184f3c3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21cb2d90c76cbc951da3a266f0dd439d64f3114a
refs/heads/master: dd446b16edd74ca525208d924d426f786dd973f8
1 change: 1 addition & 0 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ struct smb_rqst {

enum smb_version {
Smb_1 = 1,
Smb_20,
Smb_21,
Smb_30,
};
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ static const match_table_t cifs_cacheflavor_tokens = {

static const match_table_t cifs_smb_version_tokens = {
{ Smb_1, SMB1_VERSION_STRING },
{ Smb_20, SMB20_VERSION_STRING},
{ Smb_21, SMB21_VERSION_STRING },
{ Smb_30, SMB30_VERSION_STRING },
};
Expand Down Expand Up @@ -1074,6 +1075,10 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol)
vol->vals = &smb1_values;
break;
#ifdef CONFIG_CIFS_SMB2
case Smb_20:
vol->ops = &smb21_operations; /* currently identical with 2.1 */
vol->vals = &smb20_values;
break;
case Smb_21:
vol->ops = &smb21_operations;
vol->vals = &smb21_values;
Expand Down
17 changes: 17 additions & 0 deletions trunk/fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,23 @@ struct smb_version_operations smb21_operations = {
.new_lease_key = smb2_new_lease_key,
};

struct smb_version_values smb20_values = {
.version_string = SMB20_VERSION_STRING,
.protocol_id = SMB20_PROT_ID,
.req_capabilities = 0, /* MBZ */
.large_lock_type = 0,
.exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
.shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
.unlock_lock_type = SMB2_LOCKFLAG_UNLOCK,
.header_size = sizeof(struct smb2_hdr),
.max_header_size = MAX_SMB2_HDR_SIZE,
.read_rsp_size = sizeof(struct smb2_read_rsp) - 1,
.lock_cmd = SMB2_LOCK,
.cap_unix = 0,
.cap_nt_find = SMB2_NT_FIND,
.cap_large_files = SMB2_LARGE_FILES,
};

struct smb_version_values smb21_values = {
.version_string = SMB21_VERSION_STRING,
.protocol_id = SMB21_PROT_ID,
Expand Down

0 comments on commit 184f3c3

Please sign in to comment.