diff options
Diffstat (limited to 'source4/ntvfs/posix/pvfs_lock.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 14 |
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; |