mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
staging: lustre: uapi: remove obd_ioctl_freedata() wrapper
Replace obd_ioctl_freedata() with direct kvfree() call. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/24568 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d014786271
commit
bb44b987c8
@ -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 @@ out_free:
|
||||
#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 @@ out_quotactl:
|
||||
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user