Loading fs/nfs/direct.c +20 −0 Original line number Diff line number Diff line Loading @@ -505,6 +505,24 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter) return result; } static void nfs_direct_join_group(struct list_head *list, struct inode *inode) { struct nfs_page *req, *next; list_for_each_entry(req, list, wb_list) { if (req->wb_head != req || req->wb_this_page == req) continue; for (next = req->wb_this_page; next != req->wb_head; next = next->wb_this_page) { nfs_list_remove_request(next); nfs_release_request(next); } nfs_join_page_group(req, inode); } } static void nfs_direct_write_scan_commit_list(struct inode *inode, struct list_head *list, Loading @@ -527,6 +545,8 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) nfs_init_cinfo_from_dreq(&cinfo, dreq); nfs_direct_write_scan_commit_list(dreq->inode, &reqs, &cinfo); nfs_direct_join_group(&reqs, dreq->inode); dreq->count = 0; dreq->max_count = 0; list_for_each_entry(req, &reqs, wb_list) Loading fs/nfs/write.c +1 −1 Original line number Diff line number Diff line Loading @@ -501,7 +501,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list, * the (former) group. All subrequests are removed from any write or commit * lists, unlinked from the group and destroyed. */ static void void nfs_join_page_group(struct nfs_page *head, struct inode *inode) { struct nfs_page *subreq; Loading include/linux/nfs_page.h +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ extern void nfs_unlock_request(struct nfs_page *req); extern void nfs_unlock_and_release_request(struct nfs_page *); extern struct nfs_page *nfs_page_group_lock_head(struct nfs_page *req); extern int nfs_page_group_lock_subrequests(struct nfs_page *head); extern void nfs_join_page_group(struct nfs_page *head, struct inode *inode); extern int nfs_page_group_lock(struct nfs_page *); extern void nfs_page_group_unlock(struct nfs_page *); extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); Loading Loading
fs/nfs/direct.c +20 −0 Original line number Diff line number Diff line Loading @@ -505,6 +505,24 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter) return result; } static void nfs_direct_join_group(struct list_head *list, struct inode *inode) { struct nfs_page *req, *next; list_for_each_entry(req, list, wb_list) { if (req->wb_head != req || req->wb_this_page == req) continue; for (next = req->wb_this_page; next != req->wb_head; next = next->wb_this_page) { nfs_list_remove_request(next); nfs_release_request(next); } nfs_join_page_group(req, inode); } } static void nfs_direct_write_scan_commit_list(struct inode *inode, struct list_head *list, Loading @@ -527,6 +545,8 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) nfs_init_cinfo_from_dreq(&cinfo, dreq); nfs_direct_write_scan_commit_list(dreq->inode, &reqs, &cinfo); nfs_direct_join_group(&reqs, dreq->inode); dreq->count = 0; dreq->max_count = 0; list_for_each_entry(req, &reqs, wb_list) Loading
fs/nfs/write.c +1 −1 Original line number Diff line number Diff line Loading @@ -501,7 +501,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list, * the (former) group. All subrequests are removed from any write or commit * lists, unlinked from the group and destroyed. */ static void void nfs_join_page_group(struct nfs_page *head, struct inode *inode) { struct nfs_page *subreq; Loading
include/linux/nfs_page.h +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ extern void nfs_unlock_request(struct nfs_page *req); extern void nfs_unlock_and_release_request(struct nfs_page *); extern struct nfs_page *nfs_page_group_lock_head(struct nfs_page *req); extern int nfs_page_group_lock_subrequests(struct nfs_page *head); extern void nfs_join_page_group(struct nfs_page *head, struct inode *inode); extern int nfs_page_group_lock(struct nfs_page *); extern void nfs_page_group_unlock(struct nfs_page *); extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); Loading