Lines Matching refs:l_ctx
155 nfs_iocounter_wait(struct nfs_lock_context *l_ctx) in nfs_iocounter_wait() argument
157 return wait_var_event_killable(&l_ctx->io_count, in nfs_iocounter_wait()
158 !atomic_read(&l_ctx->io_count)); in nfs_iocounter_wait()
171 nfs_async_iocounter_wait(struct rpc_task *task, struct nfs_lock_context *l_ctx) in nfs_async_iocounter_wait() argument
173 struct inode *inode = d_inode(l_ctx->open_context->dentry); in nfs_async_iocounter_wait()
176 if (atomic_read(&l_ctx->io_count) > 0) { in nfs_async_iocounter_wait()
181 if (atomic_read(&l_ctx->io_count) == 0) { in nfs_async_iocounter_wait()
376 static struct nfs_page *nfs_page_create(struct nfs_lock_context *l_ctx, in nfs_page_create() argument
381 struct nfs_open_context *ctx = l_ctx->open_context; in nfs_page_create()
390 req->wb_lock_context = l_ctx; in nfs_page_create()
391 refcount_inc(&l_ctx->count); in nfs_page_create()
392 atomic_inc(&l_ctx->io_count); in nfs_page_create()
440 struct nfs_lock_context *l_ctx = nfs_get_lock_context(ctx); in nfs_page_create_from_page() local
443 if (IS_ERR(l_ctx)) in nfs_page_create_from_page()
444 return ERR_CAST(l_ctx); in nfs_page_create_from_page()
445 ret = nfs_page_create(l_ctx, pgbase, offset >> PAGE_SHIFT, in nfs_page_create_from_page()
451 nfs_put_lock_context(l_ctx); in nfs_page_create_from_page()
471 struct nfs_lock_context *l_ctx = nfs_get_lock_context(ctx); in nfs_page_create_from_folio() local
474 if (IS_ERR(l_ctx)) in nfs_page_create_from_folio()
475 return ERR_CAST(l_ctx); in nfs_page_create_from_folio()
476 ret = nfs_page_create(l_ctx, offset, folio->index, offset, count); in nfs_page_create_from_folio()
481 nfs_put_lock_context(l_ctx); in nfs_page_create_from_folio()
550 struct nfs_lock_context *l_ctx = req->wb_lock_context; in nfs_clear_request() local
561 if (l_ctx != NULL) { in nfs_clear_request()
562 if (atomic_dec_and_test(&l_ctx->io_count)) { in nfs_clear_request()
563 wake_up_var(&l_ctx->io_count); in nfs_clear_request()
564 ctx = l_ctx->open_context; in nfs_clear_request()
568 nfs_put_lock_context(l_ctx); in nfs_clear_request()