From 215804a99283c57fdd869aab350fdf6acc3460b6 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 2 Nov 2017 15:27:52 +0000 Subject: afs: Introduce a file-private data record Introduce a file-private data record for kAFS and put the key into it rather than storing the key in file->private_data. Signed-off-by: David Howells --- fs/afs/internal.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'fs/afs/internal.h') diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 6aa6e9957c44..facf5b9844d2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -138,6 +138,20 @@ struct afs_call_type { void (*work)(struct work_struct *work); }; +/* + * AFS open file information record. Pointed to by file->private_data. + */ +struct afs_file { + struct key *key; /* The key this file was opened with */ +}; + +static inline struct key *afs_file_key(struct file *file) +{ + struct afs_file *af = file->private_data; + + return af->key; +} + /* * Record of an outstanding read operation on a vnode. */ -- cgit v1.2.3-59-g8ed1b