diff options
author | David Howells <dhowells@redhat.com> | 2017-11-02 15:27:52 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-13 15:38:20 +0000 |
commit | 215804a99283c57fdd869aab350fdf6acc3460b6 (patch) | |
tree | a06a57ba4b15decbd079c0f9d17ca964280d570c /fs/afs/internal.h | |
parent | 83732ec5146916bd49b3036b0ea7dedb7831b90e (diff) |
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 <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ -139,6 +139,20 @@ struct afs_call_type { }; /* + * 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. */ struct afs_read { |