From: Ira Weiny <ira.weiny@xxxxxxxxx> Convert the kmap()/memcpy()/kunmap() pattern to memzero_page(). Cc: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx> --- fs/afs/write.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/afs/write.c b/fs/afs/write.c index 50371207f327..ed7419de0178 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -30,7 +30,6 @@ static int afs_fill_page(struct afs_vnode *vnode, struct key *key, { struct afs_read *req; size_t p; - void *data; int ret; _enter(",,%llu", (unsigned long long)pos); @@ -38,9 +37,7 @@ static int afs_fill_page(struct afs_vnode *vnode, struct key *key, if (pos >= vnode->vfs_inode.i_size) { p = pos & ~PAGE_MASK; ASSERTCMP(p + len, <=, PAGE_SIZE); - data = kmap(page); - memset(data + p, 0, len); - kunmap(page); + memzero_page(page, p, len); return 0; } -- 2.28.0.rc0.12.gb6a658bd00c9