diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-12-13 13:38:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-12-13 20:31:09 +0100 |
commit | 6fc8dc98ab0de1f2de7d086eee299d89f0527b6e (patch) | |
tree | f8a7ac1e17cff8c1bea825a69ba08288f7e184bf /source3 | |
parent | 641a2dea812faf628146145e3d04e411e7d19485 (diff) | |
download | samba-6fc8dc98ab0de1f2de7d086eee299d89f0527b6e.tar.gz samba-6fc8dc98ab0de1f2de7d086eee299d89f0527b6e.tar.bz2 samba-6fc8dc98ab0de1f2de7d086eee299d89f0527b6e.zip |
s3:smbd/oplock: pass smbd_server_connection to onefs_init_kernel_oplocks()
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/oplock.c | 2 | ||||
-rw-r--r-- | source3/smbd/oplock_onefs.c | 6 | ||||
-rw-r--r-- | source3/smbd/proto.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index fd02fbf60a..a414b72d31 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -958,7 +958,7 @@ bool init_oplocks(struct smbd_server_connection *sconn) koplocks = linux_init_kernel_oplocks(sconn); #elif HAVE_ONEFS #error Isilon, please check if the NULL context is okay here. Thanks! - koplocks = onefs_init_kernel_oplocks(NULL); + koplocks = onefs_init_kernel_oplocks(sconn); #endif } diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c index 4717b1faf7..d7e3608735 100644 --- a/source3/smbd/oplock_onefs.c +++ b/source3/smbd/oplock_onefs.c @@ -34,6 +34,7 @@ struct onefs_oplocks_context { struct kernel_oplocks *ctx; + struct smbd_server_connection *sconn; const struct oplocks_event_ops *onefs_ops; int onefs_event_fd; struct fd_event *read_fde; @@ -663,7 +664,7 @@ static const struct oplocks_event_ops onefs_dispatch_ops = { .semlock_async_failure = semlock_async_failure_handler, }; -struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx) +struct kernel_oplocks *onefs_init_kernel_oplocks(struct smbd_server_connection *sconn) { struct kernel_oplocks *_ctx = NULL; struct onefs_oplocks_context *ctx = NULL; @@ -688,6 +689,7 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx) if (!ctx) { goto err_out; } + ctx->sconn = sconn; _ctx->ops = &onefs_koplocks_ops; _ctx->flags = (KOPLOCKS_LEVEL2_SUPPORTED | @@ -709,7 +711,7 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx) DEBUG(10, ("oplock event_fd = %d\n", ctx->onefs_event_fd)); /* Register the oplock event_fd with samba's event system */ - ctx->read_fde = event_add_fd(server_event_context(), + ctx->read_fde = event_add_fd(sconn->ev_ctx, ctx, ctx->onefs_event_fd, EVENT_FD_READ, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 22eeae988e..d7a7c4e4b5 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -684,7 +684,7 @@ struct kernel_oplocks *linux_init_kernel_oplocks(struct smbd_server_connection * /* The following definitions come from smbd/oplock_onefs.c */ -struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx); +struct kernel_oplocks *onefs_init_kernel_oplocks(struct smbd_server_connection *sconn); /* The following definitions come from smbd/password.c */ |