diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 06:55:33 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 06:55:33 +0300 |
commit | 8dda9957e3a1c871dfbabf84c4760f9b26032442 (patch) | |
tree | f627992d3b0638ab7541d25d60611b2ab3e18f18 /fs/afs/write.c | |
parent | 25cd6f355dab9d11b7c8a4005867d5a30b8b14ee (diff) | |
parent | 1eda8bab70ca7d353b4e865140eaec06fedbf871 (diff) | |
download | linux-8dda9957e3a1c871dfbabf84c4760f9b26032442.tar.xz |
Merge tag 'afs-next-20190628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull afs updates from David Howells:
"A set of minor changes for AFS:
- Remove an unnecessary check in afs_unlink()
- Add a tracepoint for tracking callback management
- Add a tracepoint for afs_server object usage
- Use struct_size()
- Add mappings for AFS UAE abort codes to Linux error codes, using
symbolic names rather than hex numbers in the .c file"
* tag 'afs-next-20190628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
afs: Add support for the UAE error table
fs/afs: use struct_size() in kzalloc()
afs: Trace afs_server usage
afs: Add some callback management tracepoints
afs: afs_unlink() doesn't need to check dentry->d_inode
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r-- | fs/afs/write.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 98eb7adbce91..cb76566763db 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -44,8 +44,7 @@ static int afs_fill_page(struct afs_vnode *vnode, struct key *key, return 0; } - req = kzalloc(sizeof(struct afs_read) + sizeof(struct page *), - GFP_KERNEL); + req = kzalloc(struct_size(req, array, 1), GFP_KERNEL); if (!req) return -ENOMEM; |