pvfs_oplock: only a break level2 oplocks...
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Mar 2008 13:11:53 +0000 (14:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Mar 2008 13:40:50 +0000 (14:40 +0100)
It seems that I've tested this in the wrong way before.

metze

source/ntvfs/posix/pvfs_oplock.c

index b830ad2adc6c8b2205f87a2f908acc9acaa2c41a..3f581e54430bde038d2b3ccc4ce503f3b15f4970 100644 (file)
@@ -218,7 +218,7 @@ NTSTATUS pvfs_break_level2_oplocks(struct pvfs_file *f)
        struct odb_lock *olck;
        NTSTATUS status;
 
-       if (h->oplock && h->oplock->level == OPLOCK_EXCLUSIVE) {
+       if (h->oplock && h->oplock->level != OPLOCK_LEVEL_II) {
                return NT_STATUS_OK;
        }
 
@@ -228,16 +228,6 @@ NTSTATUS pvfs_break_level2_oplocks(struct pvfs_file *f)
                return NT_STATUS_FOOBAR;
        }
 
-       if (h->oplock && h->oplock->level == OPLOCK_BATCH) {
-               status = odb_update_oplock(olck, h, OPLOCK_LEVEL_II);
-               if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(0,("Unable to update oplock level for '%s' - %s\n",
-                                h->name->full_name, nt_errstr(status)));
-                       talloc_free(olck);
-                       return status;
-               }
-       }
-
        status = odb_break_oplocks(olck);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Unable to break level2 oplocks to none for '%s' - %s\n",