diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 16:20:33 -0700 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 21:46:30 -0500 |
commit | 95a3f2f377735ed13e42d3b8039aa1d73af2c90e (patch) | |
tree | d3deb073515ef6396d0aef390ce558237580b1dc /fs/cifs/smb1ops.c | |
parent | 2e44b2887882134abf353b28867b82645e9f0856 (diff) |
CIFS: Move oplock break to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 068d609bd02a..f55b2e3476e8 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c @@ -863,6 +863,15 @@ cifs_close_dir(const unsigned int xid, struct cifs_tcon *tcon, return CIFSFindClose(xid, tcon, fid->netfid); } +static int +cifs_oplock_response(struct cifs_tcon *tcon, struct cifs_fid *fid, + struct cifsInodeInfo *cinode) +{ + return CIFSSMBLock(0, tcon, fid->netfid, current->tgid, 0, 0, 0, 0, + LOCKING_ANDX_OPLOCK_RELEASE, false, + cinode->clientCanCacheRead ? 1 : 0); +} + struct smb_version_operations smb1_operations = { .send_cancel = send_nt_cancel, .compare_fids = cifs_compare_fids, @@ -922,6 +931,7 @@ struct smb_version_operations smb1_operations = { .query_dir_next = cifs_query_dir_next, .close_dir = cifs_close_dir, .calc_smb_size = smbCalcSize, + .oplock_response = cifs_oplock_response, }; struct smb_version_values smb1_values = { |