diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-02-28 10:33:54 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-02-28 10:33:54 +1100 |
commit | b33873ae5d13993030f41f5304d78640fe07d25c (patch) | |
tree | b4d6dfd9833b603b16474b0d5ab7918474c7a8bd /source4/ntvfs/posix/pvfs_lock.c | |
parent | 17207133ea446670e2123b510a593456928882fb (diff) | |
parent | 6dec6fbfaddf74c4567e83b354590cfbe3d6d0a9 (diff) | |
download | samba-b33873ae5d13993030f41f5304d78640fe07d25c.tar.gz samba-b33873ae5d13993030f41f5304d78640fe07d25c.tar.bz2 samba-b33873ae5d13993030f41f5304d78640fe07d25c.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit ba864cfd7ce4b69179431131cac9661cbf48bf32)
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; |