aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 51e4a77030f1..5c200fd8c652 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -338,12 +338,8 @@ static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)
338 338
339static inline struct rpc_cred *nfs_file_cred(struct file *file) 339static inline struct rpc_cred *nfs_file_cred(struct file *file)
340{ 340{
341 if (file != NULL) { 341 if (file != NULL)
342 struct nfs_open_context *ctx; 342 return nfs_file_open_context(file)->cred;
343
344 ctx = (struct nfs_open_context*)file->private_data;
345 return ctx->cred;
346 }
347 return NULL; 343 return NULL;
348} 344}
349 345