afs: unmapping the wrong buffer

We switched from kmap_atomic() to kmap() so the kunmap() calls need to
be updated to match.

Fixes: d001648ec7 ('rxrpc: Don't expose skbs to in-kernel users [ver #2]')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
Dan Carpenter 2016-10-12 09:09:44 +03:00 committed by David Howells
parent 6d3a4c4046
commit 233c9edcca

View File

@ -364,7 +364,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
buffer = kmap(page);
ret = afs_extract_data(call, buffer,
call->count, true);
kunmap(buffer);
kunmap(page);
if (ret < 0)
return ret;
}
@ -397,7 +397,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
page = call->reply3;
buffer = kmap(page);
memset(buffer + call->count, 0, PAGE_SIZE - call->count);
kunmap(buffer);
kunmap(page);
}
_leave(" = 0 [done]");