aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/nfs_page.h
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-04-07 13:59:11 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-04-25 14:18:15 -0400
commit9fcd5960e88bbdc74a70d9e3a5ab46b489fc4b80 (patch)
tree6f2b82626a3a59c4af52a6b3e30b81501dfc32ec /include/linux/nfs_page.h
parentNFS: Ensure that all nfs lock contexts have a valid open context (diff)
downloadwireguard-linux-9fcd5960e88bbdc74a70d9e3a5ab46b489fc4b80.tar.xz
wireguard-linux-9fcd5960e88bbdc74a70d9e3a5ab46b489fc4b80.zip
NFS: Add a helper to return a pointer to the open context of a struct nfs_page
Add a helper for when we remove the explicit pointer to the open context. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r--include/linux/nfs_page.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 8b36800d342d..1ea13e94feb7 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -200,4 +200,10 @@ loff_t req_offset(struct nfs_page *req)
return (((loff_t)req->wb_index) << PAGE_SHIFT) + req->wb_offset;
}
+static inline struct nfs_open_context *
+nfs_req_openctx(struct nfs_page *req)
+{
+ return req->wb_context;
+}
+
#endif /* _LINUX_NFS_PAGE_H */