vfs_glusterfs: Attach missing destructor.
authorIra Cooper <ira@samba.org>
Tue, 15 Dec 2015 12:20:38 +0000 (07:20 -0500)
committerJeremy Allison <jra@samba.org>
Tue, 15 Dec 2015 22:33:10 +0000 (23:33 +0100)
This activates the new AIO code's cancellation logic.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 15 23:33:12 CET 2015 on sn-devel-104

source3/modules/vfs_glusterfs.c

index 8025cd616ae55be9b717a9ee69ab27c3bb5c305e..e0cf7199e9f6b70b5dceb251460d4c8dc5df99fd 100644 (file)
@@ -500,10 +500,8 @@ struct glusterfs_aio_state {
        bool cancelled;
 };
 
-static int aio_wrapper_destructor(void *ptr)
+static int aio_wrapper_destructor(struct glusterfs_aio_wrapper *wrap)
 {
-       struct glusterfs_aio_wrapper *wrap = (struct glusterfs_aio_wrapper *)ptr;
-
        wrap->state->cancelled = true;
 
        return 0;
@@ -658,6 +656,7 @@ static struct glusterfs_aio_state *aio_state_create(TALLOC_CTX *mem_ctx)
                return NULL;
        }
 
+       talloc_set_destructor(wrapper, aio_wrapper_destructor);
        state->cancelled = false;
        state->ret = 0;
        state->err = 0;