Skip to content

Commit

Permalink
NFS: Add a helper to extract the nfs_open_context from a struct file
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 8fb559f commit c03025d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c03025d

Please sign in to comment.