summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-22 16:34:50 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-26 09:32:58 +0100
commit4344ac6209df4be2dad6a8b1c0766101f5972f13 (patch)
tree1b9200b086ec1ab36968e100767ad720fd419929
parent348439e9301fa3b07f5263a6dabc61557a384179 (diff)
downloadsamba-4344ac6209df4be2dad6a8b1c0766101f5972f13.tar.gz
samba-4344ac6209df4be2dad6a8b1c0766101f5972f13.tar.xz
samba-4344ac6209df4be2dad6a8b1c0766101f5972f13.zip
pvfs: send oplock breaks to none to level2 holders on write/lock requests
metze (This used to be commit b8c42a1ff8fd4131ef2a1ad92a7405a2e4d335d3)
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c3
-rw-r--r--source4/ntvfs/posix/pvfs_write.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index 0796286b7e..baa92880f1 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -307,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);
diff --git a/source4/ntvfs/posix/pvfs_write.c b/source4/ntvfs/posix/pvfs_write.c
index 5a11f01952..dda8c83407 100644
--- a/source4/ntvfs/posix/pvfs_write.c
+++ b/source4/ntvfs/posix/pvfs_write.c
@@ -57,7 +57,10 @@ NTSTATUS pvfs_write(struct ntvfs_module_context *ntvfs,
wr->writex.in.count,
WRITE_LOCK);
NT_STATUS_NOT_OK_RETURN(status);
-
+
+ status = pvfs_break_level2_oplocks(f);
+ NT_STATUS_NOT_OK_RETURN(status);
+
if (f->handle->name->stream_name) {
ret = pvfs_stream_write(pvfs,
f->handle,