aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-02-20 13:23:37 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:03:23 +0100
commit033085ff96a1615b08e80fd4327f2608ff7408cb (patch)
tree319a32ef692f829e9f72f6c28be6726736c913d8 /drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
parentstaging: lustre: discard lu_buf allocation library. (diff)
downloadlinux-dev-033085ff96a1615b08e80fd4327f2608ff7408cb.tar.xz
linux-dev-033085ff96a1615b08e80fd4327f2608ff7408cb.zip
staging: lustre: improve some libcfs_kvzalloc calls.
Using vmalloc with GFP_NOFS is not supported as vmalloc performs some internal allocations with GFP_KERNEL. So in cases where the size passed to libcfs_kvzalloc() is clearly at most 1 page, convert to kzalloc(). In cases where the call clearly doesn't hold any filesystem locks, convert to GFP_KERNEL. Unfortunately there are many more that are not easy to fix. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass/linux/linux-module.c')
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 5b1122c408fb..f8967fd44363 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -180,7 +180,7 @@ int obd_ioctl_getdata(char **buf, int *len, void __user *arg)
* obdfilter-survey is an example, which relies on ioctl. So we'd
* better avoid vmalloc on ioctl path. LU-66
*/
- *buf = libcfs_kvzalloc(hdr.ioc_len, GFP_NOFS);
+ *buf = libcfs_kvzalloc(hdr.ioc_len, GFP_KERNEL);
if (!*buf) {
CERROR("Cannot allocate control buffer of len %d\n",
hdr.ioc_len);