Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfs: move nfs_wait_on_request to write.c

nfs_wait_on_request is now only used in write.c. Move it there
and mark it static.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>

authored by

Christoph Hellwig and committed by
Anna Schumaker
f1b7c755 25edbcac

+17 -20
-19
fs/nfs/pagelist.c
··· 598 598 } 599 599 EXPORT_SYMBOL_GPL(nfs_release_request); 600 600 601 - /** 602 - * nfs_wait_on_request - Wait for a request to complete. 603 - * @req: request to wait upon. 604 - * 605 - * Interruptible by fatal signals only. 606 - * The user is responsible for holding a count on the request. 607 - */ 608 - int 609 - nfs_wait_on_request(struct nfs_page *req) 610 - { 611 - if (!test_bit(PG_BUSY, &req->wb_flags)) 612 - return 0; 613 - set_bit(PG_CONTENDED2, &req->wb_flags); 614 - smp_mb__after_atomic(); 615 - return wait_on_bit_io(&req->wb_flags, PG_BUSY, 616 - TASK_UNINTERRUPTIBLE); 617 - } 618 - EXPORT_SYMBOL_GPL(nfs_wait_on_request); 619 - 620 601 /* 621 602 * nfs_generic_pg_test - determine if requests can be coalesced 622 603 * @desc: pointer to descriptor
+17
fs/nfs/write.c
··· 478 478 nfs_destroy_unlinked_subrequests(destroy_list, head, inode); 479 479 } 480 480 481 + /** 482 + * nfs_wait_on_request - Wait for a request to complete. 483 + * @req: request to wait upon. 484 + * 485 + * Interruptible by fatal signals only. 486 + * The user is responsible for holding a count on the request. 487 + */ 488 + static int nfs_wait_on_request(struct nfs_page *req) 489 + { 490 + if (!test_bit(PG_BUSY, &req->wb_flags)) 491 + return 0; 492 + set_bit(PG_CONTENDED2, &req->wb_flags); 493 + smp_mb__after_atomic(); 494 + return wait_on_bit_io(&req->wb_flags, PG_BUSY, 495 + TASK_UNINTERRUPTIBLE); 496 + } 497 + 481 498 /* 482 499 * nfs_unroll_locks - unlock all newly locked reqs and wait on @req 483 500 * @head: head request of page group, must be holding head lock
-1
include/linux/nfs_page.h
··· 152 152 extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, 153 153 struct nfs_page *prev, 154 154 struct nfs_page *req); 155 - extern int nfs_wait_on_request(struct nfs_page *); 156 155 extern void nfs_unlock_request(struct nfs_page *req); 157 156 extern void nfs_unlock_and_release_request(struct nfs_page *); 158 157 extern void nfs_join_page_group(struct nfs_page *head,