Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
027e8eec
Commit
027e8eec
authored
Sep 19, 2012
by
Pavel Shilovsky
Committed by
Steve French
Sep 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIFS: Handle SMB2 lock flags
Signed-off-by:
Pavel Shilovsky
<
piastry@etersoft.ru
>
parent
d39a4f71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
fs/cifs/smb2ops.c
fs/cifs/smb2ops.c
+12
-0
fs/cifs/smb2pdu.h
fs/cifs/smb2pdu.h
+5
-0
No files found.
fs/cifs/smb2ops.c
View file @
027e8eec
...
...
@@ -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
,
...
...
@@ -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
,
...
...
fs/cifs/smb2pdu.h
View file @
027e8eec
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment