From 9c1310fa6ae1a67dc0fea3bf549d805ff167e78f Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Fri, 9 Jan 2009 13:07:58 -0800 Subject: s3 oplocks: Differentiate between releasing an oplock vs. downgrading to Level 2 for kernel oplocks Pass in an extra argument when releasing an oplock so kernel oplock implementations can support downgrading from Level 1 to Level 2. --- source3/smbd/oplock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/oplock.c') diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 3dac674c17..0945ac6677 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -91,7 +91,7 @@ void release_file_oplock(files_struct *fsp) if ((fsp->oplock_type != NO_OPLOCK) && (fsp->oplock_type != FAKE_LEVEL_II_OPLOCK) && koplocks) { - koplocks->ops->release_oplock(koplocks, fsp); + koplocks->ops->release_oplock(koplocks, fsp, NO_OPLOCK); } if (fsp->oplock_type == LEVEL_II_OPLOCK) { @@ -123,7 +123,7 @@ void release_file_oplock(files_struct *fsp) static void downgrade_file_oplock(files_struct *fsp) { if (koplocks) { - koplocks->ops->release_oplock(koplocks, fsp); + koplocks->ops->release_oplock(koplocks, fsp, LEVEL_II_OPLOCK); } fsp->oplock_type = LEVEL_II_OPLOCK; exclusive_oplocks_open--; -- cgit