aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@etersoft.ru>2012-09-19 09:22:43 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:33 -0400
commitf7ba7fe685bc3ed8fd0687870e68b2567d17357f (patch)
tree364ff08cf616cc740467d44d5026a05ce9d0c33c /fs/cifs/smb2ops.c
parent027e8eec31d8141a6231f772e10ccae60c9d5c13 (diff)
CIFS: Add brlock support for SMB2
Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index e4a59d1f06b1..caed2c57896d 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -544,6 +544,17 @@ smb2_compare_fids(struct cifsFileInfo *ob1, struct cifsFileInfo *ob2)
544 ob1->fid.volatile_fid == ob2->fid.volatile_fid; 544 ob1->fid.volatile_fid == ob2->fid.volatile_fid;
545} 545}
546 546
547static int
548smb2_mand_lock(const unsigned int xid, struct cifsFileInfo *cfile, __u64 offset,
549 __u64 length, __u32 type, int lock, int unlock, bool wait)
550{
551 if (unlock && !lock)
552 type = SMB2_LOCKFLAG_UNLOCK;
553 return SMB2_lock(xid, tlink_tcon(cfile->tlink),
554 cfile->fid.persistent_fid, cfile->fid.volatile_fid,
555 current->tgid, length, offset, type, wait);
556}
557
547struct smb_version_operations smb21_operations = { 558struct smb_version_operations smb21_operations = {
548 .compare_fids = smb2_compare_fids, 559 .compare_fids = smb2_compare_fids,
549 .setup_request = smb2_setup_request, 560 .setup_request = smb2_setup_request,
@@ -602,6 +613,8 @@ struct smb_version_operations smb21_operations = {
602 .is_status_pending = smb2_is_status_pending, 613 .is_status_pending = smb2_is_status_pending,
603 .oplock_response = smb2_oplock_response, 614 .oplock_response = smb2_oplock_response,
604 .queryfs = smb2_queryfs, 615 .queryfs = smb2_queryfs,
616 .mand_lock = smb2_mand_lock,
617 .mand_unlock_range = smb2_unlock_range,
605}; 618};
606 619
607struct smb_version_values smb21_values = { 620struct smb_version_values smb21_values = {