aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/write.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-11-02 15:27:52 +0000
committerDavid Howells <dhowells@redhat.com>2017-11-13 15:38:20 +0000
commit215804a99283c57fdd869aab350fdf6acc3460b6 (patch)
treea06a57ba4b15decbd079c0f9d17ca964280d570c /fs/afs/write.c
parentafs: Use a dynamic port if 7001 is in use (diff)
downloadlinux-dev-215804a99283c57fdd869aab350fdf6acc3460b6.tar.xz
linux-dev-215804a99283c57fdd869aab350fdf6acc3460b6.zip
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/write.c')
-rw-r--r--fs/afs/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 1377a40ecdbb..1cdd0e3cd531 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -128,7 +128,7 @@ int afs_write_begin(struct file *file, struct address_space *mapping,
struct afs_writeback *candidate, *wb;
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
struct page *page;
- struct key *key = file->private_data;
+ struct key *key = afs_file_key(file);
unsigned from = pos & (PAGE_SIZE - 1);
unsigned to = from + len;
pgoff_t index = pos >> PAGE_SHIFT;
@@ -255,7 +255,7 @@ int afs_write_end(struct file *file, struct address_space *mapping,
struct page *page, void *fsdata)
{
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
- struct key *key = file->private_data;
+ struct key *key = afs_file_key(file);
loff_t i_size, maybe_i_size;
int ret;