Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326305
b: refs/heads/master
c: 027e8ee
h: refs/heads/master
i:
  326303: a93d24d
v: v3
  • Loading branch information
Pavel Shilovsky authored and Steve French committed Sep 25, 2012
1 parent 6377f80 commit 089ae76
Show file tree
Hide file tree
Showing 3 changed files with 18 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: d39a4f710b7a7be05b6ed9d4ab8fac754c139f8a
refs/heads/master: 027e8eec31d8141a6231f772e10ccae60c9d5c13
12 changes: 12 additions & 0 deletions trunk/fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,15 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}

static bool
smb2_compare_fids(struct cifsFileInfo *ob1, struct cifsFileInfo *ob2)
{
return ob1->fid.persistent_fid == ob2->fid.persistent_fid &&
ob1->fid.volatile_fid == ob2->fid.volatile_fid;
}

struct smb_version_operations smb21_operations = {
.compare_fids = smb2_compare_fids,
.setup_request = smb2_setup_request,
.setup_async_request = smb2_setup_async_request,
.check_receive = smb2_check_receive,
Expand Down Expand Up @@ -598,6 +606,10 @@ struct smb_version_operations smb21_operations = {

struct smb_version_values smb21_values = {
.version_string = SMB21_VERSION_STRING,
.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,
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/cifs/smb2pdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ struct smb2_write_rsp {
__u8 Buffer[1];
} __packed;

#define SMB2_LOCKFLAG_SHARED_LOCK 0x0001
#define SMB2_LOCKFLAG_EXCLUSIVE_LOCK 0x0002
#define SMB2_LOCKFLAG_UNLOCK 0x0004
#define SMB2_LOCKFLAG_FAIL_IMMEDIATELY 0x0010

struct smb2_echo_req {
struct smb2_hdr hdr;
__le16 StructureSize; /* Must be 4 */
Expand Down

0 comments on commit 089ae76

Please sign in to comment.