Commit bb44b987 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: uapi: remove obd_ioctl_freedata() wrapper

Replace obd_ioctl_freedata() with direct kvfree() call.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/24568Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarBen Evans <bevans@cray.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0147862
......@@ -211,11 +211,6 @@ static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data)
int obd_ioctl_getdata(char **buf, int *len, void __user *arg);
int obd_ioctl_popdata(void __user *arg, void *data, int len);
static inline void obd_ioctl_freedata(char *buf, size_t len)
{
kvfree(buf);
}
/*
* OBD_IOC_DATA_TYPE is only for compatibility reasons with older
* Linux Lustre user tools. New ioctls should NOT use this macro as
......
......@@ -1097,7 +1097,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
goto out_free;
}
out_free:
obd_ioctl_freedata(buf, len);
kvfree(buf);
return rc;
}
case LL_IOC_LMV_SETSTRIPE: {
......@@ -1147,7 +1147,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
#endif
rc = ll_dir_setdirstripe(inode, lum, filename, mode);
lmv_out_free:
obd_ioctl_freedata(buf, len);
kvfree(buf);
return rc;
}
case LL_IOC_LMV_SET_DEFAULT_STRIPE: {
......@@ -1626,7 +1626,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
rc = ll_migrate(inode, file, mdtidx, filename, namelen - 1);
migrate_free:
obd_ioctl_freedata(buf, len);
kvfree(buf);
return rc;
}
......
......@@ -2231,8 +2231,7 @@ int ll_obd_statfs(struct inode *inode, void __user *arg)
if (rc)
goto out_statfs;
out_statfs:
if (buf)
obd_ioctl_freedata(buf, len);
kvfree(buf);
return rc;
}
......
......@@ -1087,17 +1087,17 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
data = (struct obd_ioctl_data *)buf;
if (sizeof(*desc) > data->ioc_inllen1) {
obd_ioctl_freedata(buf, len);
kvfree(buf);
return -EINVAL;
}
if (sizeof(uuidp->uuid) * count > data->ioc_inllen2) {
obd_ioctl_freedata(buf, len);
kvfree(buf);
return -EINVAL;
}
if (sizeof(__u32) * count > data->ioc_inllen3) {
obd_ioctl_freedata(buf, len);
kvfree(buf);
return -EINVAL;
}
......@@ -1116,7 +1116,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
if (copy_to_user(uarg, buf, len))
rc = -EFAULT;
obd_ioctl_freedata(buf, len);
kvfree(buf);
break;
}
case OBD_IOC_QUOTACTL: {
......
......@@ -369,8 +369,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
}
out:
if (buf)
obd_ioctl_freedata(buf, len);
kvfree(buf);
return err;
} /* class_handle_ioctl */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment