From 4344ac6209df4be2dad6a8b1c0766101f5972f13 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Feb 2008 16:34:50 +0100 Subject: pvfs: send oplock breaks to none to level2 holders on write/lock requests metze (This used to be commit b8c42a1ff8fd4131ef2a1ad92a7405a2e4d335d3) --- source4/ntvfs/posix/pvfs_lock.c | 3 +++ source4/ntvfs/posix/pvfs_write.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs') 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, -- cgit