aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb1ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-19 09:22:43 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:32 -0400
commitd39a4f710b7a7be05b6ed9d4ab8fac754c139f8a (patch)
treefad6f02af54ad574a7dd189f695b602e0c04f816 /fs/cifs/smb1ops.c
parentf45d34167c67b083b54690e349e77f59062ef0ea (diff)
CIFS: Move brlock code to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r--fs/cifs/smb1ops.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index ed7f95532383..5fb0fe5f72b6 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -899,6 +899,15 @@ cifs_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
899 return rc; 899 return rc;
900} 900}
901 901
902static int
903cifs_mand_lock(const unsigned int xid, struct cifsFileInfo *cfile, __u64 offset,
904 __u64 length, __u32 type, int lock, int unlock, bool wait)
905{
906 return CIFSSMBLock(xid, tlink_tcon(cfile->tlink), cfile->fid.netfid,
907 current->tgid, length, offset, unlock, lock,
908 (__u8)type, wait, 0);
909}
910
902struct smb_version_operations smb1_operations = { 911struct smb_version_operations smb1_operations = {
903 .send_cancel = send_nt_cancel, 912 .send_cancel = send_nt_cancel,
904 .compare_fids = cifs_compare_fids, 913 .compare_fids = cifs_compare_fids,
@@ -960,6 +969,9 @@ struct smb_version_operations smb1_operations = {
960 .calc_smb_size = smbCalcSize, 969 .calc_smb_size = smbCalcSize,
961 .oplock_response = cifs_oplock_response, 970 .oplock_response = cifs_oplock_response,
962 .queryfs = cifs_queryfs, 971 .queryfs = cifs_queryfs,
972 .mand_lock = cifs_mand_lock,
973 .mand_unlock_range = cifs_unlock_range,
974 .push_mand_locks = cifs_push_mandatory_locks,
963}; 975};
964 976
965struct smb_version_values smb1_values = { 977struct smb_version_values smb1_values = {