summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-18 11:35:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-06 10:22:22 +0200
commit57c491fd844d71a1d1e472204153aa86e2a3dd6e (patch)
tree4a1bf4adf11de093bc88f7fb5a72fd0e2078832f /include
parent79f1b33c53a0f54c6f624792d5cb51826d8f5cff (diff)
downloadlinux-stable-57c491fd844d71a1d1e472204153aa86e2a3dd6e.tar.gz
linux-stable-57c491fd844d71a1d1e472204153aa86e2a3dd6e.tar.bz2
linux-stable-57c491fd844d71a1d1e472204153aa86e2a3dd6e.zip
NFS: Clean up list moves of struct nfs_page
[ Upstream commit 078b5fd92c4913dd367361db6c28568386077c89 ] In several places we're just moving the struct nfs_page from one list to another by first removing from the existing list, then adding to the new one. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_page.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index e27572d30d97..ad69430fd0eb 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -164,6 +164,16 @@ nfs_list_add_request(struct nfs_page *req, struct list_head *head)
list_add_tail(&req->wb_list, head);
}
+/**
+ * nfs_list_move_request - Move a request to a new list
+ * @req: request
+ * @head: head of list into which to insert the request.
+ */
+static inline void
+nfs_list_move_request(struct nfs_page *req, struct list_head *head)
+{
+ list_move_tail(&req->wb_list, head);
+}
/**
* nfs_list_remove_request - Remove a request from its wb_list