Lines Matching refs:subreq
359 struct nfs_page *subreq = destroy_list; in nfs_destroy_unlinked_subrequests() local
361 destroy_list = (subreq->wb_this_page == old_head) ? in nfs_destroy_unlinked_subrequests()
362 NULL : subreq->wb_this_page; in nfs_destroy_unlinked_subrequests()
365 nfs_page_set_headlock(subreq); in nfs_destroy_unlinked_subrequests()
366 WARN_ON_ONCE(old_head != subreq->wb_head); in nfs_destroy_unlinked_subrequests()
369 subreq->wb_this_page = subreq; in nfs_destroy_unlinked_subrequests()
370 subreq->wb_head = subreq; in nfs_destroy_unlinked_subrequests()
372 clear_bit(PG_REMOVE, &subreq->wb_flags); in nfs_destroy_unlinked_subrequests()
375 if (!kref_read(&subreq->wb_kref)) { in nfs_destroy_unlinked_subrequests()
377 if (test_and_clear_bit(PG_TEARDOWN, &subreq->wb_flags)) { in nfs_destroy_unlinked_subrequests()
378 nfs_page_clear_headlock(subreq); in nfs_destroy_unlinked_subrequests()
379 nfs_free_request(subreq); in nfs_destroy_unlinked_subrequests()
381 nfs_page_clear_headlock(subreq); in nfs_destroy_unlinked_subrequests()
384 nfs_page_clear_headlock(subreq); in nfs_destroy_unlinked_subrequests()
388 if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) { in nfs_destroy_unlinked_subrequests()
389 nfs_release_request(subreq); in nfs_destroy_unlinked_subrequests()
395 nfs_unlock_and_release_request(subreq); in nfs_destroy_unlinked_subrequests()
413 struct nfs_page *subreq; in nfs_join_page_group() local
420 for (subreq = head->wb_this_page; subreq != head; in nfs_join_page_group()
421 subreq = subreq->wb_this_page) { in nfs_join_page_group()
423 if (pgbase > subreq->wb_pgbase) { in nfs_join_page_group()
424 off -= pgbase - subreq->wb_pgbase; in nfs_join_page_group()
425 bytes += pgbase - subreq->wb_pgbase; in nfs_join_page_group()
426 pgbase = subreq->wb_pgbase; in nfs_join_page_group()
428 bytes = max(subreq->wb_pgbase + subreq->wb_bytes in nfs_join_page_group()
439 subreq = head; in nfs_join_page_group()
441 nfs_clear_request_commit(cinfo, subreq); in nfs_join_page_group()
442 subreq = subreq->wb_this_page; in nfs_join_page_group()
443 } while (subreq != head); in nfs_join_page_group()
503 nfs_page_group_lock_subreq(struct nfs_page *head, struct nfs_page *subreq) in nfs_page_group_lock_subreq() argument
507 if (!kref_get_unless_zero(&subreq->wb_kref)) in nfs_page_group_lock_subreq()
509 while (!nfs_lock_request(subreq)) { in nfs_page_group_lock_subreq()
511 ret = nfs_wait_on_request(subreq); in nfs_page_group_lock_subreq()
515 nfs_unroll_locks(head, subreq); in nfs_page_group_lock_subreq()
516 nfs_release_request(subreq); in nfs_page_group_lock_subreq()
541 struct nfs_page *head, *subreq; in nfs_lock_and_join_requests() local
575 for (subreq = head->wb_this_page; in nfs_lock_and_join_requests()
576 subreq != head; in nfs_lock_and_join_requests()
577 subreq = subreq->wb_this_page) { in nfs_lock_and_join_requests()
578 if (test_bit(PG_REMOVE, &subreq->wb_flags)) in nfs_lock_and_join_requests()
580 ret = nfs_page_group_lock_subreq(head, subreq); in nfs_lock_and_join_requests()