summaryrefslogtreecommitdiff
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2017-03-10 13:24:24 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-03-10 13:24:24 +1100
commit7f36522fa5c8192dccee0f0a414f1b7b336b9c87 (patch)
tree443ab002a359443792f43c48790e91539a01e4d4 /fs/ceph/file.c
parentbab31490ee78b5c5531bae6d54d411a49d2c2f30 (diff)
parent28415881a8fced951563443d0a95f9f14cea8687 (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 26cc95421cca..18c045e2ead6 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -74,12 +74,9 @@ dio_get_pages_alloc(const struct iov_iter *it, size_t nbytes,
align = (unsigned long)(it->iov->iov_base + it->iov_offset) &
(PAGE_SIZE - 1);
npages = calc_pages_for(align, nbytes);
- pages = kmalloc(sizeof(*pages) * npages, GFP_KERNEL);
- if (!pages) {
- pages = vmalloc(sizeof(*pages) * npages);
- if (!pages)
- return ERR_PTR(-ENOMEM);
- }
+ pages = kvmalloc(sizeof(*pages) * npages, GFP_KERNEL);
+ if (!pages)
+ return ERR_PTR(-ENOMEM);
for (idx = 0; idx < npages; ) {
size_t start;