summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_lock.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-26 13:07:55 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-26 13:07:55 +0100
commita999a1fc996234555bd2d8a4a873b39d111c347e (patch)
tree737b0bf68f6a93d6e835676b96b8bb3c606d1c91 /source4/ntvfs/posix/pvfs_lock.c
parent227df641f680d844c85ea0ed1694e41ed355e262 (diff)
parent901addd4a18a9a166fc3518a7bce70969f884e6f (diff)
downloadsamba-a999a1fc996234555bd2d8a4a873b39d111c347e.tar.gz
samba-a999a1fc996234555bd2d8a4a873b39d111c347e.tar.bz2
samba-a999a1fc996234555bd2d8a4a873b39d111c347e.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit 4dab354b626a02e9a5f5cac0d374d18e22718e18)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_lock.c')
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index df85b2b775..baa92880f1 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -294,6 +294,10 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
return ntvfs_map_lock(ntvfs, req, lck);
}
+ if (lck->lockx.in.mode & LOCKING_ANDX_OPLOCK_RELEASE) {
+ return pvfs_oplock_release(ntvfs, req, lck);
+ }
+
f = pvfs_find_fd(pvfs, req, lck->lockx.in.file.ntvfs);
if (!f) {
return NT_STATUS_INVALID_HANDLE;
@@ -303,6 +307,9 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
return NT_STATUS_FILE_IS_A_DIRECTORY;
}
+ status = pvfs_break_level2_oplocks(f);
+ NT_STATUS_NOT_OK_RETURN(status);
+
if (lck->lockx.in.timeout != 0 &&
(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
pending = talloc(f, struct pvfs_pending_lock);
@@ -338,13 +345,6 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
return NT_STATUS_DOS(ERRDOS, ERRnoatomiclocks);
}
- if (lck->lockx.in.mode & LOCKING_ANDX_OPLOCK_RELEASE) {
- DEBUG(0,("received unexpected oplock break\n"));
- talloc_free(pending);
- return NT_STATUS_NOT_IMPLEMENTED;
- }
-
-
/* the unlocks happen first */
locks = lck->lockx.in.locks;