Lines Matching refs:head
183 nfs_page_group_search_locked(struct nfs_page *head, unsigned int page_offset) in nfs_page_group_search_locked() argument
187 WARN_ON_ONCE(head != head->wb_head); in nfs_page_group_search_locked()
188 WARN_ON_ONCE(!test_bit(PG_HEADLOCK, &head->wb_head->wb_flags)); in nfs_page_group_search_locked()
190 req = head; in nfs_page_group_search_locked()
197 } while (req != head); in nfs_page_group_search_locked()
324 nfs_unroll_locks_and_wait(struct inode *inode, struct nfs_page *head, in nfs_unroll_locks_and_wait() argument
332 for (tmp = head ; tmp != req; tmp = tmp->wb_this_page) in nfs_unroll_locks_and_wait()
340 nfs_page_group_unlock(head); in nfs_unroll_locks_and_wait()
344 nfs_release_request(head); in nfs_unroll_locks_and_wait()
431 struct nfs_page *head, *subreq; in nfs_lock_and_join_requests() local
448 head = nfs_page_find_head_request_locked(NFS_I(inode), page); in nfs_lock_and_join_requests()
450 if (!head) { in nfs_lock_and_join_requests()
457 ret = nfs_page_group_lock(head, true); in nfs_lock_and_join_requests()
462 nfs_page_group_lock_wait(head); in nfs_lock_and_join_requests()
463 nfs_release_request(head); in nfs_lock_and_join_requests()
467 nfs_release_request(head); in nfs_lock_and_join_requests()
472 subreq = head; in nfs_lock_and_join_requests()
478 if (subreq->wb_offset == (head->wb_offset + total_bytes)) { in nfs_lock_and_join_requests()
481 } else if (WARN_ON_ONCE(subreq->wb_offset < head->wb_offset || in nfs_lock_and_join_requests()
483 (head->wb_offset + total_bytes)))) { in nfs_lock_and_join_requests()
484 nfs_page_group_unlock(head); in nfs_lock_and_join_requests()
492 ret = nfs_unroll_locks_and_wait(inode, head, in nfs_lock_and_join_requests()
502 } while (subreq != head); in nfs_lock_and_join_requests()
506 subreq = head; in nfs_lock_and_join_requests()
510 } while (subreq != head); in nfs_lock_and_join_requests()
513 if (head->wb_this_page != head) { in nfs_lock_and_join_requests()
515 destroy_list = head->wb_this_page; in nfs_lock_and_join_requests()
516 head->wb_this_page = head; in nfs_lock_and_join_requests()
520 head->wb_bytes = total_bytes; in nfs_lock_and_join_requests()
526 nfs_page_group_clear_bits(head); in nfs_lock_and_join_requests()
533 if (!test_and_set_bit(PG_INODE_REF, &head->wb_flags)) in nfs_lock_and_join_requests()
534 kref_get(&head->wb_kref); in nfs_lock_and_join_requests()
536 nfs_page_group_unlock(head); in nfs_lock_and_join_requests()
541 nfs_destroy_unlinked_subrequests(destroy_list, head); in nfs_lock_and_join_requests()
545 return head; in nfs_lock_and_join_requests()
707 struct nfs_page *head; in nfs_inode_remove_request() local
710 head = req->wb_head; in nfs_inode_remove_request()
713 if (likely(!PageSwapCache(head->wb_page))) { in nfs_inode_remove_request()
714 set_page_private(head->wb_page, 0); in nfs_inode_remove_request()
715 ClearPagePrivate(head->wb_page); in nfs_inode_remove_request()
717 wake_up_page(head->wb_page, PG_private); in nfs_inode_remove_request()
718 clear_bit(PG_MAPPED, &head->wb_flags); in nfs_inode_remove_request()
1321 static void nfs_async_write_error(struct list_head *head) in nfs_async_write_error() argument
1325 while (!list_empty(head)) { in nfs_async_write_error()
1326 req = nfs_list_entry(head->next); in nfs_async_write_error()
1605 static loff_t nfs_get_lwb(struct list_head *head) in nfs_get_lwb() argument
1610 list_for_each_entry(req, head, wb_list) in nfs_get_lwb()
1621 struct list_head *head, in nfs_init_commit() argument
1625 struct nfs_page *first = nfs_list_entry(head->next); in nfs_init_commit()
1631 list_splice_init(head, &data->pages); in nfs_init_commit()
1676 nfs_commit_list(struct inode *inode, struct list_head *head, int how, in nfs_commit_list() argument
1687 nfs_init_commit(data, head, NULL, cinfo); in nfs_commit_list()
1692 nfs_retry_commit(head, NULL, cinfo, 0); in nfs_commit_list()
1780 int nfs_generic_commit_list(struct inode *inode, struct list_head *head, in nfs_generic_commit_list() argument
1785 status = pnfs_commit_list(inode, head, how, cinfo); in nfs_generic_commit_list()
1787 status = nfs_commit_list(inode, head, how, cinfo); in nfs_generic_commit_list()
1793 LIST_HEAD(head); in nfs_commit_inode()
1802 res = nfs_scan_commit(inode, &head, &cinfo); in nfs_commit_inode()
1806 error = nfs_generic_commit_list(inode, &head, how, &cinfo); in nfs_commit_inode()