Lines Matching refs:dwc
2116 struct ocfs2_dio_write_ctxt *dwc = NULL; in ocfs2_dio_alloc_write_ctx() local
2121 dwc = kmalloc(sizeof(struct ocfs2_dio_write_ctxt), GFP_NOFS); in ocfs2_dio_alloc_write_ctx()
2122 if (dwc == NULL) in ocfs2_dio_alloc_write_ctx()
2124 INIT_LIST_HEAD(&dwc->dw_zero_list); in ocfs2_dio_alloc_write_ctx()
2125 dwc->dw_zero_count = 0; in ocfs2_dio_alloc_write_ctx()
2126 dwc->dw_orphaned = 0; in ocfs2_dio_alloc_write_ctx()
2127 dwc->dw_writer_pid = task_pid_nr(current); in ocfs2_dio_alloc_write_ctx()
2128 bh->b_private = dwc; in ocfs2_dio_alloc_write_ctx()
2131 return dwc; in ocfs2_dio_alloc_write_ctx()
2135 struct ocfs2_dio_write_ctxt *dwc) in ocfs2_dio_free_write_ctx() argument
2137 ocfs2_free_unwritten_list(inode, &dwc->dw_zero_list); in ocfs2_dio_free_write_ctx()
2138 kfree(dwc); in ocfs2_dio_free_write_ctx()
2161 struct ocfs2_dio_write_ctxt *dwc = NULL; in ocfs2_dio_wr_get_block() local
2209 dwc = ocfs2_dio_alloc_write_ctx(bh_result, &first_get_block); in ocfs2_dio_wr_get_block()
2210 if (unlikely(dwc == NULL)) { in ocfs2_dio_wr_get_block()
2218 !dwc->dw_orphaned) { in ocfs2_dio_wr_get_block()
2229 dwc->dw_orphaned = 1; in ocfs2_dio_wr_get_block()
2288 list_splice_tail_init(&wc->w_unwritten_list, &dwc->dw_zero_list); in ocfs2_dio_wr_get_block()
2289 dwc->dw_zero_count += wc->w_unwritten_count; in ocfs2_dio_wr_get_block()
2306 struct ocfs2_dio_write_ctxt *dwc, in ocfs2_dio_end_io_write() argument
2327 if (list_empty(&dwc->dw_zero_list) && in ocfs2_dio_end_io_write()
2329 !dwc->dw_orphaned) in ocfs2_dio_end_io_write()
2341 if (dwc->dw_orphaned) { in ocfs2_dio_end_io_write()
2342 BUG_ON(dwc->dw_writer_pid != task_pid_nr(current)); in ocfs2_dio_end_io_write()
2362 ret = ocfs2_lock_allocators(inode, &et, 0, dwc->dw_zero_count*2, in ocfs2_dio_end_io_write()
2384 list_for_each_entry(ue, &dwc->dw_zero_list, ue_node) { in ocfs2_dio_end_io_write()
2412 ocfs2_dio_free_write_ctx(inode, dwc); in ocfs2_dio_end_io_write()