Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c03025d5 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Add a helper to extract the nfs_open_context from a struct file

parent 8fb559f8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -331,6 +331,11 @@ extern const struct inode_operations nfs3_file_inode_operations;
extern const struct file_operations nfs_file_operations;
extern const struct address_space_operations nfs_file_aops;

static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)
{
	return filp->private_data;
}

static inline struct rpc_cred *nfs_file_cred(struct file *file)
{
	if (file != NULL) {