s3 oplocks: Make the level2 oplock contention API more granular
[tprouty/samba.git] / source3 / smbd / aio.c
index 75ce07d41a9d4c4921c96d9228e26964f95b9985..6b19e098e5cf0e45fc6bb1d0b0ed1cb721a79c28 100644 (file)
@@ -291,7 +291,9 @@ bool schedule_aio_write_and_X(connection_struct *conn,
 
        aio_ex->req = talloc_move(aio_ex, &req);
 
-       release_level_2_oplocks_on_change(fsp);
+       /* This should actually be improved to span the write. */
+       contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_WRITE);
+       contend_level2_oplocks_end(fsp, LEVEL2_CONTEND_WRITE);
 
        if (!write_through && !lp_syncalways(SNUM(fsp->conn))
            && fsp->aio_write_behind) {