/* OBD Operations Declarations */
extern struct obd_device *class_exp2obd(struct obd_export *);
-extern int class_handle_ioctl(unsigned int cmd, unsigned long arg);
+extern int class_handle_ioctl(unsigned int cmd, void __user *uarg);
int lustre_get_jobid(char *jobid, size_t len);
void lustre_jobid_clear(const char *jobid);
void jobid_cache_fini(void);
struct inode *inode = file_inode(file);
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct obd_ioctl_data *data = NULL;
+ void __user *uarg = (void __user *)arg;
int rc = 0;
ENTRY;
switch (cmd) {
case FS_IOC_GETFLAGS:
case FS_IOC_SETFLAGS:
- RETURN(ll_iocontrol(inode, file, cmd, arg));
+ RETURN(ll_iocontrol(inode, file, cmd, uarg));
case FSFILT_IOC_GETVERSION:
case FS_IOC_GETVERSION:
RETURN(put_user(inode->i_generation, (int __user *)arg));
int namelen, len = 0;
char *filename;
- rc = obd_ioctl_getdata(&data, &len, (void __user *)arg);
+ rc = obd_ioctl_getdata(&data, &len, uarg);
if (rc != 0)
RETURN(rc);
int len;
int rc;
- rc = obd_ioctl_getdata(&data, &len, (void __user *)arg);
+ rc = obd_ioctl_getdata(&data, &len, uarg);
if (rc)
RETURN(rc);
}
case LL_IOC_LMV_SET_DEFAULT_STRIPE: {
- struct lmv_user_md lum;
- struct lmv_user_md __user *ulump =
- (struct lmv_user_md __user *)arg;
- int rc;
+ struct lmv_user_md lum;
+ struct lmv_user_md __user *ulump = uarg;
+ int rc;
if (copy_from_user(&lum, ulump, sizeof(lum)))
RETURN(-EFAULT);
struct lov_user_md_v3 *lumv3 = NULL;
struct lov_user_md_v1 lumv1;
struct lov_user_md_v1 *lumv1_ptr = &lumv1;
- struct lov_user_md_v1 __user *lumv1p =
- (struct lov_user_md_v1 __user *)arg;
- struct lov_user_md_v3 __user *lumv3p =
- (struct lov_user_md_v3 __user *)arg;
+ struct lov_user_md_v1 __user *lumv1p = uarg;
+ struct lov_user_md_v3 __user *lumv3p = uarg;
int lum_size = 0;
-
int set_default = 0;
BUILD_BUG_ON(sizeof(struct lov_user_md_v3) <=
RETURN(rc);
}
case LL_IOC_LMV_GETSTRIPE: {
- struct lmv_user_md __user *ulmv =
- (struct lmv_user_md __user *)arg;
- struct lmv_user_md lum;
- struct ptlrpc_request *request = NULL;
- struct ptlrpc_request *root_request = NULL;
- union lmv_mds_md *lmm = NULL;
- int lmmsize;
- u64 valid = 0;
- struct lmv_user_md *tmp = NULL;
- int mdt_index;
- int lum_size;
- int stripe_count;
- int max_stripe_count;
- int i;
- int rc;
+ struct lmv_user_md __user *ulmv = uarg;
+ struct lmv_user_md lum;
+ struct ptlrpc_request *request = NULL;
+ struct ptlrpc_request *root_request = NULL;
+ union lmv_mds_md *lmm = NULL;
+ int lmmsize;
+ u64 valid = 0;
+ struct lmv_user_md *tmp = NULL;
+ int mdt_index;
+ int lum_size;
+ int stripe_count;
+ int max_stripe_count;
+ int i;
+ int rc;
if (copy_from_user(&lum, ulmv, sizeof(*ulmv)))
RETURN(-EFAULT);
if (!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_LVB_TYPE))
RETURN(-ENOTSUPP);
- filename = ll_getname((const char __user *)arg);
+ filename = ll_getname(uarg);
if (IS_ERR(filename))
RETURN(PTR_ERR(filename));
rc = ll_rmdir_entry(inode, filename, namelen);
out_rmdir:
- if (filename)
- ll_putname(filename);
+ if (filename)
+ ll_putname(filename);
RETURN(rc);
}
case LL_IOC_RMFID:
- RETURN(ll_rmfid(file, (void __user *)arg));
+ RETURN(ll_rmfid(file, uarg));
case LL_IOC_LOV_SWAP_LAYOUTS:
RETURN(-EPERM);
case IOC_OBD_STATFS:
- RETURN(ll_obd_statfs(inode, (void __user *)arg));
+ RETURN(ll_obd_statfs(inode, uarg));
case LL_IOC_LOV_GETSTRIPE:
case LL_IOC_LOV_GETSTRIPE_NEW:
case LL_IOC_MDC_GETINFO_V1:
if (cmd == IOC_MDC_GETFILEINFO_V1 ||
cmd == IOC_MDC_GETFILEINFO_V2 ||
cmd == IOC_MDC_GETFILESTRIPE) {
- filename = ll_getname((const char __user *)arg);
+ filename = ll_getname(uarg);
if (IS_ERR(filename))
RETURN(PTR_ERR(filename));
if (cmd == IOC_MDC_GETFILESTRIPE ||
cmd == LL_IOC_LOV_GETSTRIPE ||
cmd == LL_IOC_LOV_GETSTRIPE_NEW) {
- lump = (struct lov_user_md __user *)arg;
+ lump = uarg;
} else if (cmd == IOC_MDC_GETFILEINFO_V1 ||
cmd == LL_IOC_MDC_GETINFO_V1){
struct lov_user_mds_data_v1 __user *lmdp;
- lmdp = (struct lov_user_mds_data_v1 __user *)arg;
+ lmdp = uarg;
statp = &lmdp->lmd_st;
lump = &lmdp->lmd_lmm;
} else {
struct lov_user_mds_data __user *lmdp;
- lmdp = (struct lov_user_mds_data __user *)arg;
+ lmdp = uarg;
fidp = &lmdp->lmd_fid;
stxp = &lmdp->lmd_stx;
flagsp = &lmdp->lmd_flags;
if (!qctl)
RETURN(-ENOMEM);
- if (copy_from_user(qctl, (void __user *)arg, sizeof(*qctl)))
+ if (copy_from_user(qctl, uarg, sizeof(*qctl)))
GOTO(out_quotactl, rc = -EFAULT);
if (LUSTRE_Q_CMD_IS_POOL(qctl->qc_cmd)) {
- char __user *from = (char __user *)arg +
+ char __user *from = uarg +
offsetof(typeof(*qctl), qc_poolname);
if (copy_from_user(qctl->qc_poolname, from,
LOV_MAXPOOLNAME + 1))
rc = quotactl_ioctl(inode->i_sb, qctl);
if ((rc == 0 || rc == -ENODATA) &&
- copy_to_user((void __user *)arg, qctl, sizeof(*qctl)))
- rc = -EFAULT;
-
+ copy_to_user(uarg, qctl, sizeof(*qctl)))
+ rc = -EFAULT;
out_quotactl:
OBD_FREE(qctl, qctl_len);
RETURN(rc);
- }
+ }
case OBD_IOC_GETNAME_OLD:
case OBD_IOC_GETDTNAME:
case OBD_IOC_GETMDNAME:
- RETURN(ll_get_obd_name(inode, cmd, arg));
- case LL_IOC_FLUSHCTX:
- RETURN(ll_flush_ctx(inode));
- case LL_IOC_GETOBDCOUNT: {
+ RETURN(ll_get_obd_name(inode, cmd, uarg));
+ case LL_IOC_FLUSHCTX:
+ RETURN(ll_flush_ctx(inode));
+ case LL_IOC_GETOBDCOUNT: {
u32 count, vallen;
- struct obd_export *exp;
+ struct obd_export *exp;
- if (copy_from_user(&count, (int __user *)arg, sizeof(int)))
- RETURN(-EFAULT);
+ if (copy_from_user(&count, uarg, sizeof(count)))
+ RETURN(-EFAULT);
- /* get ost count when count is zero, get mdt count otherwise */
- exp = count ? sbi->ll_md_exp : sbi->ll_dt_exp;
- vallen = sizeof(count);
+ /* get ost count when count is zero, get mdt count otherwise */
+ exp = count ? sbi->ll_md_exp : sbi->ll_dt_exp;
+ vallen = sizeof(count);
rc = obd_get_info(NULL, exp, sizeof(KEY_TGT_COUNT),
KEY_TGT_COUNT, &vallen, &count);
- if (rc) {
- CERROR("get target count failed: %d\n", rc);
- RETURN(rc);
- }
+ if (rc) {
+ CERROR("get target count failed: %d\n", rc);
+ RETURN(rc);
+ }
+
+ if (copy_to_user(uarg, &count, sizeof(count)))
+ RETURN(-EFAULT);
- if (copy_to_user((int __user *)arg, &count, sizeof(int)))
- RETURN(-EFAULT);
-
- RETURN(0);
- }
- case LL_IOC_PATH2FID:
- if (copy_to_user((void __user *)arg, ll_inode2fid(inode),
- sizeof(struct lu_fid)))
- RETURN(-EFAULT);
- RETURN(0);
- case LL_IOC_GET_CONNECT_FLAGS: {
- RETURN(obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL,
- (void __user *)arg));
- }
+ RETURN(0);
+ }
+ case LL_IOC_PATH2FID:
+ if (copy_to_user(uarg, ll_inode2fid(inode),
+ sizeof(struct lu_fid)))
+ RETURN(-EFAULT);
+ RETURN(0);
+ case LL_IOC_GET_CONNECT_FLAGS:
+ RETURN(obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, uarg));
case OBD_IOC_FID2PATH:
- RETURN(ll_fid2path(inode, (void __user *)arg));
+ RETURN(ll_fid2path(inode, uarg));
case LL_IOC_GETPARENT:
- RETURN(ll_getparent(file, (void __user *)arg));
+ RETURN(ll_getparent(file, uarg));
case LL_IOC_FID2MDTIDX: {
struct obd_export *exp = ll_i2mdexp(inode);
- struct lu_fid fid;
- __u32 index;
+ struct lu_fid fid;
+ __u32 index;
- if (copy_from_user(&fid, (const struct lu_fid __user *)arg,
- sizeof(fid)))
+ if (copy_from_user(&fid, uarg, sizeof(fid)))
RETURN(-EFAULT);
/* Call mdc_iocontrol */
RETURN(index);
}
case LL_IOC_HSM_REQUEST: {
- struct hsm_user_request *hur;
- ssize_t totalsize;
+ struct hsm_user_request *hur;
+ ssize_t totalsize;
OBD_ALLOC_PTR(hur);
if (hur == NULL)
RETURN(-ENOMEM);
/* We don't know the true size yet; copy the fixed-size part */
- if (copy_from_user(hur, (void __user *)arg, sizeof(*hur))) {
+ if (copy_from_user(hur, uarg, sizeof(*hur))) {
OBD_FREE_PTR(hur);
RETURN(-EFAULT);
}
RETURN(-ENOMEM);
/* Copy the whole struct */
- if (copy_from_user(hur, (void __user *)arg, totalsize))
+ if (copy_from_user(hur, uarg, totalsize))
GOTO(out_hur, rc = -EFAULT);
if (hur->hur_request.hr_action == HUA_RELEASE) {
rc = obd_iocontrol(cmd, ll_i2mdexp(inode), totalsize,
hur, NULL);
}
-
out_hur:
OBD_FREE_LARGE(hur, totalsize);
RETURN(rc);
}
case LL_IOC_HSM_PROGRESS: {
- struct hsm_progress_kernel hpk;
- struct hsm_progress hp;
+ struct hsm_progress_kernel hpk;
+ struct hsm_progress hp;
- if (copy_from_user(&hp, (void __user *)arg, sizeof(hp)))
+ if (copy_from_user(&hp, uarg, sizeof(hp)))
RETURN(-EFAULT);
hpk.hpk_fid = hp.hp_fid;
if (!capable(CAP_SYS_ADMIN))
RETURN(-EPERM);
- rc = copy_and_ct_start(cmd, sbi->ll_md_exp,
- (struct lustre_kernelcomm __user *)arg);
+ rc = copy_and_ct_start(cmd, sbi->ll_md_exp, uarg);
RETURN(rc);
case LL_IOC_HSM_COPY_START: {
- struct hsm_copy *copy;
- int rc;
+ struct hsm_copy *copy;
+ int rc;
OBD_ALLOC_PTR(copy);
if (copy == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(copy, (char __user *)arg, sizeof(*copy))) {
+ if (copy_from_user(copy, uarg, sizeof(*copy))) {
OBD_FREE_PTR(copy);
RETURN(-EFAULT);
}
rc = ll_ioc_copy_start(inode->i_sb, copy);
- if (copy_to_user((char __user *)arg, copy, sizeof(*copy)))
+ if (copy_to_user(uarg, copy, sizeof(*copy)))
rc = -EFAULT;
OBD_FREE_PTR(copy);
RETURN(rc);
}
case LL_IOC_HSM_COPY_END: {
- struct hsm_copy *copy;
- int rc;
+ struct hsm_copy *copy;
+ int rc;
OBD_ALLOC_PTR(copy);
if (copy == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(copy, (char __user *)arg, sizeof(*copy))) {
+ if (copy_from_user(copy, uarg, sizeof(*copy))) {
OBD_FREE_PTR(copy);
RETURN(-EFAULT);
}
rc = ll_ioc_copy_end(inode->i_sb, copy);
- if (copy_to_user((char __user *)arg, copy, sizeof(*copy)))
+ if (copy_to_user(uarg, copy, sizeof(*copy)))
rc = -EFAULT;
OBD_FREE_PTR(copy);
__u32 flags;
int rc;
- rc = obd_ioctl_getdata(&data, &len, (void __user *)arg);
+ rc = obd_ioctl_getdata(&data, &len, uarg);
if (rc)
RETURN(rc);
RETURN(rc);
}
case FS_IOC_FSGETXATTR:
- RETURN(ll_ioctl_fsgetxattr(inode, cmd, arg));
+ RETURN(ll_ioctl_fsgetxattr(inode, cmd, uarg));
case FS_IOC_FSSETXATTR:
- RETURN(ll_ioctl_fssetxattr(inode, cmd, arg));
+ RETURN(ll_ioctl_fssetxattr(inode, cmd, uarg));
case LL_IOC_PROJECT:
- RETURN(ll_ioctl_project(file, cmd, arg));
+ RETURN(ll_ioctl_project(file, cmd, uarg));
case LL_IOC_PCC_DETACH_BY_FID: {
struct lu_pcc_detach_fid *detach;
struct lu_fid *fid;
if (detach == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(detach,
- (const struct lu_pcc_detach_fid __user *)arg,
- sizeof(*detach)))
+ if (copy_from_user(detach, uarg, sizeof(*detach)))
GOTO(out_detach, rc = -EFAULT);
fid = &detach->pccd_fid;
case LL_IOC_SET_ENCRYPTION_POLICY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_set_policy(file, (const void __user *)arg);
+ return llcrypt_ioctl_set_policy(file, uarg);
case LL_IOC_GET_ENCRYPTION_POLICY_EX:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_get_policy_ex(file, (void __user *)arg);
+ return llcrypt_ioctl_get_policy_ex(file, uarg);
case LL_IOC_ADD_ENCRYPTION_KEY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- rc = llcrypt_ioctl_add_key(file, (void __user *)arg);
+ rc = llcrypt_ioctl_add_key(file, uarg);
#ifdef CONFIG_LL_ENCRYPTION
if (!rc)
sptlrpc_enc_pool_add_user();
case LL_IOC_REMOVE_ENCRYPTION_KEY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_remove_key(file, (void __user *)arg);
+ return llcrypt_ioctl_remove_key(file, uarg);
case LL_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_remove_key_all_users(file,
- (void __user *)arg);
+ return llcrypt_ioctl_remove_key_all_users(file, uarg);
case LL_IOC_GET_ENCRYPTION_KEY_STATUS:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_get_key_status(file, (void __user *)arg);
+ return llcrypt_ioctl_get_key_status(file, uarg);
#endif
default:
- RETURN(obd_iocontrol(cmd, sbi->ll_dt_exp, 0, NULL,
- (void __user *)arg));
+ RETURN(obd_iocontrol(cmd, sbi->ll_dt_exp, 0, NULL, uarg));
}
}
* After lease is taken, send the RPC MDS_REINT_RESYNC to the MDT
*/
static int ll_lease_file_resync(struct obd_client_handle *och,
- struct inode *inode, unsigned long arg)
+ struct inode *inode, void __user *uarg)
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct md_op_data *op_data;
if (IS_ERR(op_data))
RETURN(PTR_ERR(op_data));
- if (copy_from_user(&ioc, (struct ll_ioc_lease_id __user *)arg,
- sizeof(ioc)))
+ if (copy_from_user(&ioc, uarg, sizeof(ioc)))
RETURN(-EFAULT);
/* before starting file resync, it's necessary to clean up page cache
static int ll_lov_setstripe(struct inode *inode, struct file *file,
void __user *arg)
{
- struct lov_user_md __user *lum = (struct lov_user_md __user *)arg;
- struct lov_user_md *klum;
- int lum_size, rc;
- __u64 flags = FMODE_WRITE;
+ struct lov_user_md __user *lum = arg;
+ struct lov_user_md *klum;
+ int lum_size, rc;
+ __u64 flags = FMODE_WRITE;
ENTRY;
rc = ll_copy_user_md(lum, &klum);
if (file->f_flags & O_NONBLOCK) {
if (!mutex_trylock(&lli->lli_group_mutex))
RETURN(-EAGAIN);
- } else
+ } else {
mutex_lock(&lli->lli_group_mutex);
+ }
if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
CWARN("group lock already existed with gid %lu\n",
}
int ll_ioctl_fsgetxattr(struct inode *inode, unsigned int cmd,
- unsigned long arg)
+ void __user *uarg)
{
struct fsxattr fsxattr;
- if (copy_from_user(&fsxattr,
- (const struct fsxattr __user *)arg,
- sizeof(fsxattr)))
+ if (copy_from_user(&fsxattr, uarg, sizeof(fsxattr)))
RETURN(-EFAULT);
fsxattr.fsx_xflags = ll_inode_flags_to_xflags(inode->i_flags);
if (test_bit(LLIF_PROJECT_INHERIT, &ll_i2info(inode)->lli_flags))
fsxattr.fsx_xflags |= FS_XFLAG_PROJINHERIT;
fsxattr.fsx_projid = ll_i2info(inode)->lli_projid;
- if (copy_to_user((struct fsxattr __user *)arg,
- &fsxattr, sizeof(fsxattr)))
+ if (copy_to_user(uarg, &fsxattr, sizeof(fsxattr)))
RETURN(-EFAULT);
RETURN(0);
}
int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd,
- unsigned long arg)
+ void __user *uarg)
{
struct fsxattr fsxattr;
ENTRY;
- if (copy_from_user(&fsxattr,
- (const struct fsxattr __user *)arg,
- sizeof(fsxattr)))
+ if (copy_from_user(&fsxattr, uarg, sizeof(fsxattr)))
RETURN(-EFAULT);
RETURN(ll_set_project(inode, fsxattr.fsx_xflags,
fsxattr.fsx_projid));
}
-int ll_ioctl_project(struct file *file, unsigned int cmd,
- unsigned long arg)
+int ll_ioctl_project(struct file *file, unsigned int cmd, void __user *uarg)
{
struct lu_project lu_project;
struct dentry *dentry = file_dentry(file);
struct dentry *child_dentry = NULL;
int rc = 0, name_len;
- if (copy_from_user(&lu_project,
- (const struct lu_project __user *)arg,
- sizeof(lu_project)))
+ if (copy_from_user(&lu_project, uarg, sizeof(lu_project)))
RETURN(-EFAULT);
/* apply child dentry if name is valid */
&ll_i2info(inode)->lli_flags))
lu_project.project_xflags |= FS_XFLAG_PROJINHERIT;
lu_project.project_id = ll_i2info(inode)->lli_projid;
- if (copy_to_user((struct lu_project __user *)arg,
- &lu_project, sizeof(lu_project))) {
+ if (copy_to_user(uarg, &lu_project, sizeof(lu_project))) {
rc = -EFAULT;
goto out;
}
}
static long ll_file_unlock_lease(struct file *file, struct ll_ioc_lease *ioc,
- unsigned long arg)
+ void __user *uarg)
{
- struct inode *inode = file_inode(file);
- struct ll_file_data *fd = file->private_data;
- struct ll_inode_info *lli = ll_i2info(inode);
+ struct inode *inode = file_inode(file);
+ struct ll_file_data *fd = file->private_data;
+ struct ll_inode_info *lli = ll_i2info(inode);
struct obd_client_handle *och = NULL;
struct split_param sp;
struct pcc_param param;
if (!data)
GOTO(out_lease_close, rc = -ENOMEM);
- if (copy_from_user(data, (void __user *)arg, data_size))
+ if (copy_from_user(data, uarg, data_size))
GOTO(out_lease_close, rc = -EFAULT);
bias = MDS_CLOSE_RESYNC_DONE;
break;
case LL_LEASE_LAYOUT_MERGE: {
-
if (ioc->lil_count != 1)
GOTO(out_lease_close, rc = -EINVAL);
- arg += sizeof(*ioc);
- if (copy_from_user(&fdv, (void __user *)arg, sizeof(__u32)))
+ uarg += sizeof(*ioc);
+ if (copy_from_user(&fdv, uarg, sizeof(__u32)))
GOTO(out_lease_close, rc = -EFAULT);
layout_file = fget(fdv);
if (ioc->lil_count != 2)
GOTO(out_lease_close, rc = -EINVAL);
- arg += sizeof(*ioc);
- if (copy_from_user(&fdv, (void __user *)arg, sizeof(__u32)))
+ uarg += sizeof(*ioc);
+ if (copy_from_user(&fdv, uarg, sizeof(__u32)))
GOTO(out_lease_close, rc = -EFAULT);
- arg += sizeof(__u32);
- if (copy_from_user(&mirror_id, (void __user *)arg,
- sizeof(__u32)))
+ uarg += sizeof(__u32);
+ if (copy_from_user(&mirror_id, uarg, sizeof(__u32)))
GOTO(out_lease_close, rc = -EFAULT);
layout_file = fget(fdv);
if (IS_ENCRYPTED(inode))
RETURN(-EOPNOTSUPP);
- arg += sizeof(*ioc);
- if (copy_from_user(¶m.pa_archive_id, (void __user *)arg,
- sizeof(__u32)))
+ uarg += sizeof(*ioc);
+ if (copy_from_user(¶m.pa_archive_id, uarg, sizeof(__u32)))
GOTO(out_lease_close, rc2 = -EFAULT);
rc2 = pcc_readwrite_attach(file, inode, param.pa_archive_id);
}
static long ll_file_set_lease(struct file *file, struct ll_ioc_lease *ioc,
- unsigned long arg)
+ void __user *uarg)
{
struct inode *inode = file_inode(file);
struct ll_inode_info *lli = ll_i2info(inode);
fmode = FMODE_READ;
break;
case LL_LEASE_UNLCK:
- RETURN(ll_file_unlock_lease(file, ioc, arg));
+ RETURN(ll_file_unlock_lease(file, ioc, uarg));
default:
RETURN(-EINVAL);
}
RETURN(PTR_ERR(och));
if (ioc->lil_flags & LL_LEASE_RESYNC) {
- rc = ll_lease_file_resync(och, inode, arg);
+ rc = ll_lease_file_resync(och, inode, uarg);
if (rc) {
ll_lease_close(och, inode, NULL);
RETURN(rc);
static long
ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- struct inode *inode = file_inode(file);
- struct ll_file_data *fd = file->private_data;
- int flags, rc;
+ struct inode *inode = file_inode(file);
+ struct ll_file_data *fd = file->private_data;
+ void __user *uarg = (void __user *)arg;
+ int flags, rc;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), cmd=%x\n",
case LL_IOC_GETFLAGS:
/* Get the current value of the file flags */
return put_user(fd->fd_flags, (int __user *)arg);
- case LL_IOC_SETFLAGS:
- case LL_IOC_CLRFLAGS:
- /* Set or clear specific file flags */
- /* XXX This probably needs checks to ensure the flags are
- * not abused, and to handle any flag side effects.
- */
- if (get_user(flags, (int __user *) arg))
- RETURN(-EFAULT);
-
- if (cmd == LL_IOC_SETFLAGS) {
- if ((flags & LL_FILE_IGNORE_LOCK) &&
- !(file->f_flags & O_DIRECT)) {
- CERROR("%s: unable to disable locking on "
- "non-O_DIRECT file\n", current->comm);
- RETURN(-EINVAL);
- }
-
- fd->fd_flags |= flags;
- } else {
- fd->fd_flags &= ~flags;
- }
- RETURN(0);
+ case LL_IOC_SETFLAGS:
+ case LL_IOC_CLRFLAGS:
+ /* Set or clear specific file flags */
+ /* XXX This probably needs checks to ensure the flags are
+ * not abused, and to handle any flag side effects.
+ */
+ if (get_user(flags, (int __user *)arg))
+ RETURN(-EFAULT);
+
+ if (cmd == LL_IOC_SETFLAGS) {
+ if ((flags & LL_FILE_IGNORE_LOCK) &&
+ !(file->f_flags & O_DIRECT)) {
+ CERROR("%s: unable to disable locking on "
+ "non-O_DIRECT file\n", current->comm);
+ RETURN(-EINVAL);
+ }
+
+ fd->fd_flags |= flags;
+ } else {
+ fd->fd_flags &= ~flags;
+ }
+ RETURN(0);
case LL_IOC_LOV_SETSTRIPE:
case LL_IOC_LOV_SETSTRIPE_NEW:
- RETURN(ll_lov_setstripe(inode, file, (void __user *)arg));
+ RETURN(ll_lov_setstripe(inode, file, uarg));
case LL_IOC_LOV_SETEA:
- RETURN(ll_lov_setea(inode, file, (void __user *)arg));
+ RETURN(ll_lov_setea(inode, file, uarg));
case LL_IOC_LOV_SWAP_LAYOUTS: {
struct file *file2;
struct lustre_swap_layouts lsl;
- if (copy_from_user(&lsl, (char __user *)arg,
- sizeof(struct lustre_swap_layouts)))
+ if (copy_from_user(&lsl, uarg, sizeof(lsl)))
RETURN(-EFAULT);
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
GOTO(out, rc = -EPERM);
if (lsl.sl_flags & SWAP_LAYOUTS_CLOSE) {
- struct inode *inode2;
- struct ll_inode_info *lli;
- struct obd_client_handle *och = NULL;
+ struct obd_client_handle *och = NULL;
+ struct ll_inode_info *lli;
+ struct inode *inode2;
lli = ll_i2info(inode);
mutex_lock(&lli->lli_och_mutex);
}
case LL_IOC_LOV_GETSTRIPE:
case LL_IOC_LOV_GETSTRIPE_NEW:
- RETURN(ll_file_getstripe(inode, (void __user *)arg, 0));
+ RETURN(ll_file_getstripe(inode, uarg, 0));
case FS_IOC_GETFLAGS:
case FS_IOC_SETFLAGS:
- RETURN(ll_iocontrol(inode, file, cmd, arg));
+ RETURN(ll_iocontrol(inode, file, cmd, uarg));
case FSFILT_IOC_GETVERSION:
case FS_IOC_GETVERSION:
RETURN(put_user(inode->i_generation, (int __user *)arg));
case FS_IOC_SETVERSION:
RETURN(-ENOTSUPP);
- case LL_IOC_GROUP_LOCK:
- RETURN(ll_get_grouplock(inode, file, arg));
- case LL_IOC_GROUP_UNLOCK:
- RETURN(ll_put_grouplock(inode, file, arg));
- case IOC_OBD_STATFS:
- RETURN(ll_obd_statfs(inode, (void __user *)arg));
+ case LL_IOC_GROUP_LOCK:
+ RETURN(ll_get_grouplock(inode, file, arg));
+ case LL_IOC_GROUP_UNLOCK:
+ RETURN(ll_put_grouplock(inode, file, arg));
+ case IOC_OBD_STATFS:
+ RETURN(ll_obd_statfs(inode, uarg));
case LL_IOC_FLUSHCTX:
RETURN(ll_flush_ctx(inode));
case LL_IOC_PATH2FID: {
- if (copy_to_user((void __user *)arg, ll_inode2fid(inode),
+ if (copy_to_user(uarg, ll_inode2fid(inode),
sizeof(struct lu_fid)))
RETURN(-EFAULT);
RETURN(0);
}
case LL_IOC_GETPARENT:
- RETURN(ll_getparent(file, (struct getparent __user *)arg));
+ RETURN(ll_getparent(file, uarg));
case OBD_IOC_FID2PATH:
- RETURN(ll_fid2path(inode, (void __user *)arg));
+ RETURN(ll_fid2path(inode, uarg));
case LL_IOC_DATA_VERSION: {
- struct ioc_data_version idv;
+ struct ioc_data_version idv;
int rc;
- if (copy_from_user(&idv, (char __user *)arg, sizeof(idv)))
+ if (copy_from_user(&idv, uarg, sizeof(idv)))
RETURN(-EFAULT);
idv.idv_flags &= LL_DV_RD_FLUSH | LL_DV_WR_FLUSH;
rc = ll_ioc_data_version(inode, &idv);
- if (rc == 0 &&
- copy_to_user((char __user *)arg, &idv, sizeof(idv)))
+ if (rc == 0 && copy_to_user(uarg, &idv, sizeof(idv)))
RETURN(-EFAULT);
RETURN(rc);
}
- case LL_IOC_GET_MDTIDX: {
- int mdtidx;
+ case LL_IOC_GET_MDTIDX: {
+ int mdtidx;
- mdtidx = ll_get_mdt_idx(inode);
- if (mdtidx < 0)
- RETURN(mdtidx);
+ mdtidx = ll_get_mdt_idx(inode);
+ if (mdtidx < 0)
+ RETURN(mdtidx);
- if (put_user((int)mdtidx, (int __user *)arg))
- RETURN(-EFAULT);
+ if (put_user(mdtidx, (int __user *)arg))
+ RETURN(-EFAULT);
- RETURN(0);
- }
+ RETURN(0);
+ }
case OBD_IOC_GETNAME_OLD:
case OBD_IOC_GETDTNAME:
case OBD_IOC_GETMDNAME:
- RETURN(ll_get_obd_name(inode, cmd, arg));
+ RETURN(ll_get_obd_name(inode, cmd, uarg));
case LL_IOC_HSM_STATE_GET: {
- struct md_op_data *op_data;
- struct hsm_user_state *hus;
- int rc;
+ struct md_op_data *op_data;
+ struct hsm_user_state *hus;
+ int rc;
OBD_ALLOC_PTR(hus);
if (hus == NULL)
rc = obd_iocontrol(cmd, ll_i2mdexp(inode), sizeof(*op_data),
op_data, NULL);
- if (copy_to_user((void __user *)arg, hus, sizeof(*hus)))
+ if (copy_to_user(uarg, hus, sizeof(*hus)))
rc = -EFAULT;
ll_finish_md_op_data(op_data);
RETURN(rc);
}
case LL_IOC_HSM_STATE_SET: {
- struct hsm_state_set *hss;
- int rc;
+ struct hsm_state_set *hss;
+ int rc;
OBD_ALLOC_PTR(hss);
if (hss == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(hss, (char __user *)arg, sizeof(*hss))) {
+ if (copy_from_user(hss, uarg, sizeof(*hss))) {
OBD_FREE_PTR(hss);
RETURN(-EFAULT);
}
hca->hca_location.offset, hca->hca_location.length);
}
- if (copy_to_user((char __user *)arg, hca, sizeof(*hca)))
+ if (copy_to_user(uarg, hca, sizeof(*hca)))
rc = -EFAULT;
skip_copy:
ll_finish_md_op_data(op_data);
RETURN(rc);
}
case LL_IOC_SET_LEASE_OLD: {
- struct ll_ioc_lease ioc = { .lil_mode = (__u32)arg };
+ struct ll_ioc_lease ioc = { .lil_mode = arg };
RETURN(ll_file_set_lease(file, &ioc, 0));
}
case LL_IOC_SET_LEASE: {
struct ll_ioc_lease ioc;
- if (copy_from_user(&ioc, (void __user *)arg, sizeof(ioc)))
+ if (copy_from_user(&ioc, uarg, sizeof(ioc)))
RETURN(-EFAULT);
- RETURN(ll_file_set_lease(file, &ioc, arg));
+ RETURN(ll_file_set_lease(file, &ioc, uarg));
}
case LL_IOC_GET_LEASE: {
struct ll_inode_info *lli = ll_i2info(inode);
if (hui == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(hui, (void __user *)arg, sizeof(*hui))) {
+ if (copy_from_user(hui, uarg, sizeof(*hui))) {
OBD_FREE_PTR(hui);
RETURN(-EFAULT);
}
case LL_IOC_FUTIMES_3: {
struct ll_futimes_3 lfu;
- if (copy_from_user(&lfu,
- (const struct ll_futimes_3 __user *)arg,
- sizeof(lfu)))
+ if (copy_from_user(&lfu, uarg, sizeof(lfu)))
RETURN(-EFAULT);
RETURN(ll_file_futimes_3(file, &lfu));
int alloc_size = sizeof(*k_ladvise_hdr);
rc = 0;
- u_ladvise_hdr = (void __user *)arg;
+ u_ladvise_hdr = uarg;
OBD_ALLOC_PTR(k_ladvise_hdr);
if (k_ladvise_hdr == NULL)
RETURN(-ENOMEM);
if (!(file->f_flags & O_DIRECT))
RETURN(-EINVAL);
- fd->fd_designated_mirror = (__u32)arg;
+ fd->fd_designated_mirror = arg;
RETURN(0);
}
case FS_IOC_FSGETXATTR:
- RETURN(ll_ioctl_fsgetxattr(inode, cmd, arg));
+ RETURN(ll_ioctl_fsgetxattr(inode, cmd, uarg));
case FS_IOC_FSSETXATTR:
- RETURN(ll_ioctl_fssetxattr(inode, cmd, arg));
+ RETURN(ll_ioctl_fssetxattr(inode, cmd, uarg));
case LL_IOC_PROJECT:
- RETURN(ll_ioctl_project(file, cmd, arg));
+ RETURN(ll_ioctl_project(file, cmd, uarg));
case BLKSSZGET:
RETURN(put_user(PAGE_SIZE, (int __user *)arg));
case LL_IOC_HEAT_GET: {
struct lu_heat *heat;
int size;
- if (copy_from_user(&uheat, (void __user *)arg, sizeof(uheat)))
+ if (copy_from_user(&uheat, uarg, sizeof(uheat)))
RETURN(-EFAULT);
if (uheat.lh_count > OBD_HEAT_COUNT)
heat->lh_count = uheat.lh_count;
ll_heat_get(inode, heat);
- rc = copy_to_user((char __user *)arg, heat, size);
+ rc = copy_to_user(uarg, heat, size);
OBD_FREE(heat, size);
RETURN(rc ? -EFAULT : 0);
}
case LL_IOC_HEAT_SET: {
__u64 flags;
- if (copy_from_user(&flags, (void __user *)arg, sizeof(flags)))
+ if (copy_from_user(&flags, uarg, sizeof(flags)))
RETURN(-EFAULT);
rc = ll_heat_set(inode, flags);
if (detach == NULL)
RETURN(-ENOMEM);
- if (copy_from_user(detach,
- (const struct lu_pcc_detach __user *)arg,
- sizeof(*detach)))
+ if (copy_from_user(detach, uarg, sizeof(*detach)))
GOTO(out_detach_free, rc = -EFAULT);
if (!S_ISREG(inode->i_mode))
RETURN(rc);
}
case LL_IOC_PCC_STATE: {
- struct lu_pcc_state __user *ustate =
- (struct lu_pcc_state __user *)arg;
+ struct lu_pcc_state __user *ustate = uarg;
struct lu_pcc_state *state;
OBD_ALLOC_PTR(state);
case LL_IOC_SET_ENCRYPTION_POLICY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_set_policy(file, (const void __user *)arg);
+ return llcrypt_ioctl_set_policy(file, uarg);
case LL_IOC_GET_ENCRYPTION_POLICY_EX:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_get_policy_ex(file, (void __user *)arg);
+ return llcrypt_ioctl_get_policy_ex(file, uarg);
case LL_IOC_ADD_ENCRYPTION_KEY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_add_key(file, (void __user *)arg);
+ return llcrypt_ioctl_add_key(file, uarg);
case LL_IOC_REMOVE_ENCRYPTION_KEY:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_remove_key(file, (void __user *)arg);
+ return llcrypt_ioctl_remove_key(file, uarg);
case LL_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_remove_key_all_users(file,
- (void __user *)arg);
+ return llcrypt_ioctl_remove_key_all_users(file, uarg);
case LL_IOC_GET_ENCRYPTION_KEY_STATUS:
if (!ll_sbi_has_encrypt(ll_i2sbi(inode)))
return -EOPNOTSUPP;
- return llcrypt_ioctl_get_key_status(file, (void __user *)arg);
+ return llcrypt_ioctl_get_key_status(file, uarg);
#endif
case LL_IOC_UNLOCK_FOREIGN: {
}
default:
- RETURN(obd_iocontrol(cmd, ll_i2dtexp(inode), 0, NULL,
- (void __user *)arg));
+ RETURN(obd_iocontrol(cmd, ll_i2dtexp(inode), 0, NULL, uarg));
}
}
int mask);
int ll_ioctl_check_project(struct inode *inode, __u32 xflags, __u32 projid);
int ll_ioctl_fsgetxattr(struct inode *inode, unsigned int cmd,
- unsigned long arg);
+ void __user *uarg);
int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd,
- unsigned long arg);
-int ll_ioctl_project(struct file *file, unsigned int cmd,
- unsigned long arg);
-
+ void __user *uarg);
+int ll_ioctl_project(struct file *file, unsigned int cmd, void __user *uarg);
int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
__u64 flags, struct lov_user_md *lum,
int lum_size);
void ll_truncate_inode_pages_final(struct inode *inode, struct cl_io *io);
void ll_delete_inode(struct inode *inode);
int ll_iocontrol(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg);
+ unsigned int cmd, void __user *uarg);
int ll_flush_ctx(struct inode *inode);
void ll_umount_begin(struct super_block *sb);
int ll_remount_fs(struct super_block *sb, int *flags, char *data);
__u32 mode, enum md_op_code opc,
void *data);
void ll_finish_md_op_data(struct md_op_data *op_data);
-int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg);
+int ll_get_obd_name(struct inode *inode, unsigned int cmd, void __user *arg);
void ll_compute_rootsquash_state(struct ll_sb_info *sbi);
ssize_t ll_copy_user_md(const struct lov_user_md __user *md,
struct lov_user_md **kbuf);
}
int ll_iocontrol(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+ unsigned int cmd, void __user *uarg)
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *req = NULL;
ptlrpc_req_finished(req);
- RETURN(put_user(flags, (int __user *)arg));
+ RETURN(put_user(flags, (int __user *)uarg));
}
case FS_IOC_SETFLAGS: {
struct iattr *attr;
struct cl_object *obj;
struct fsxattr fa = { 0 };
- if (get_user(flags, (int __user *)arg))
+ if (get_user(flags, (int __user *)uarg))
RETURN(-EFAULT);
fa.fsx_projid = ll_i2info(inode)->lli_projid;
return rc;
}
-int ll_obd_statfs(struct inode *inode, void __user *arg)
+int ll_obd_statfs(struct inode *inode, void __user *uarg)
{
struct ll_sb_info *sbi = NULL;
struct obd_export *exp;
if (!sbi)
GOTO(out_statfs, rc = -EINVAL);
- rc = obd_ioctl_getdata(&data, &len, arg);
+ rc = obd_ioctl_getdata(&data, &len, uarg);
if (rc)
GOTO(out_statfs, rc);
/**
* Get obd name by cmd, and copy out to user space
*/
-int ll_get_obd_name(struct inode *inode, unsigned int cmd, unsigned long arg)
+int ll_get_obd_name(struct inode *inode, unsigned int cmd, void __user *uarg)
{
- struct ll_sb_info *sbi = ll_i2sbi(inode);
- struct obd_device *obd;
- ENTRY;
+ struct ll_sb_info *sbi = ll_i2sbi(inode);
+ struct obd_device *obd;
+ ENTRY;
if (cmd == OBD_IOC_GETNAME_OLD || cmd == OBD_IOC_GETDTNAME)
- obd = class_exp2obd(sbi->ll_dt_exp);
- else if (cmd == OBD_IOC_GETMDNAME)
- obd = class_exp2obd(sbi->ll_md_exp);
- else
- RETURN(-EINVAL);
+ obd = class_exp2obd(sbi->ll_dt_exp);
+ else if (cmd == OBD_IOC_GETMDNAME)
+ obd = class_exp2obd(sbi->ll_md_exp);
+ else
+ RETURN(-EINVAL);
- if (!obd)
- RETURN(-ENOENT);
+ if (!obd)
+ RETURN(-ENOENT);
- if (copy_to_user((void __user *)arg, obd->obd_name,
- strlen(obd->obd_name) + 1))
+ if (copy_to_user(uarg, obd->obd_name, strlen(obd->obd_name) + 1))
RETURN(-EFAULT);
RETURN(0);
}
EXPORT_SYMBOL(obd_ioctl_getdata);
-int class_handle_ioctl(unsigned int cmd, unsigned long arg)
+int class_handle_ioctl(unsigned int cmd, void __user *uarg)
{
struct obd_ioctl_data *data;
struct obd_device *obd = NULL;
ENTRY;
CDEBUG(D_IOCTL, "cmd = %x\n", cmd);
- if (obd_ioctl_getdata(&data, &len, (void __user *)arg)) {
+ if (obd_ioctl_getdata(&data, &len, uarg)) {
CERROR("OBD ioctl: data error\n");
RETURN(-EINVAL);
}
memcpy(data->ioc_bulk, LUSTRE_VERSION_STRING,
strlen(LUSTRE_VERSION_STRING) + 1);
- if (copy_to_user((void __user *)arg, data, len))
+ if (copy_to_user(uarg, data, len))
err = -EFAULT;
GOTO(out, err);
}
#endif
- case OBD_IOC_NAME2DEV: {
- /* Resolve a device name. This does not change the
- * currently selected device.
- */
- int dev;
-
- dev = class_resolve_dev_name(data->ioc_inllen1,
- data->ioc_inlbuf1);
- data->ioc_dev = dev;
- if (dev < 0)
- GOTO(out, err = -EINVAL);
+ case OBD_IOC_NAME2DEV: {
+ /* Resolve device name, does not change current selected dev */
+ int dev;
+
+ dev = class_resolve_dev_name(data->ioc_inllen1,
+ data->ioc_inlbuf1);
+ data->ioc_dev = dev;
+ if (dev < 0)
+ GOTO(out, err = -EINVAL);
- if (copy_to_user((void __user *)arg, data, sizeof(*data)))
- err = -EFAULT;
- GOTO(out, err);
- }
+ if (copy_to_user(uarg, data, sizeof(*data)))
+ err = -EFAULT;
+ GOTO(out, err);
+ }
case OBD_IOC_UUID2DEV: {
/* Resolve a device uuid. This does not change the
GOTO(out, err = -EINVAL);
}
- CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
- dev);
- if (copy_to_user((void __user *)arg, data, sizeof(*data)))
- err = -EFAULT;
- GOTO(out, err);
- }
+ CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
+ dev);
+ if (copy_to_user(uarg, data, sizeof(*data)))
+ err = -EFAULT;
+ GOTO(out, err);
+ }
case OBD_IOC_GETDEVICE: {
int index = data->ioc_count;
else
status = "--";
- str = (char *)data->ioc_bulk;
- snprintf(str, len - sizeof(*data), "%3d %s %s %s %s %d",
- (int)index, status, obd->obd_type->typ_name,
- obd->obd_name, obd->obd_uuid.uuid,
+ str = data->ioc_bulk;
+ snprintf(str, len - sizeof(*data), "%3d %s %s %s %s %d",
+ index, status, obd->obd_type->typ_name,
+ obd->obd_name, obd->obd_uuid.uuid,
atomic_read(&obd->obd_refcount));
- if (copy_to_user((void __user *)arg, data, len))
+ if (copy_to_user(uarg, data, len))
err = -EFAULT;
GOTO(out, err);
- }
-
- }
+ }
+ }
if (data->ioc_dev == OBD_DEV_BY_DEVNAME) {
if (data->ioc_inllen4 <= 0 || data->ioc_inlbuf4 == NULL)
if (err)
GOTO(out, err);
- if (copy_to_user((void __user *)arg, data, len))
+ if (copy_to_user(uarg, data, len))
err = -EFAULT;
out:
OBD_FREE_LARGE(data, len);
if ((cmd & 0xffffff00) == ((int)'T') << 8) /* ignore all tty ioctls */
RETURN(err = -ENOTTY);
- err = class_handle_ioctl(cmd, (unsigned long)arg);
+ err = class_handle_ioctl(cmd, (void __user *)arg);
RETURN(err);
}
return mask;
}
-static long oal_ioctl_info(struct oal_circ_buf *ocb, unsigned long arg)
+static long oal_ioctl_info(struct oal_circ_buf *ocb, void __user *uarg)
{
struct ofd_access_log *oal = ocb->ocb_access_log;
-
struct lustre_access_log_info_v1 __user *lali;
u32 entry_count = CIRC_CNT(ocb->ocb_circ.head,
ocb->ocb_circ.tail,
ocb->ocb_circ.tail,
oal->oal_log_size) / oal->oal_entry_size;
- lali = (struct lustre_access_log_info_v1 __user *)arg;
+ lali = uarg;
BUILD_BUG_ON(sizeof(lali->lali_name) != sizeof(oal->oal_name));
if (put_user(LUSTRE_ACCESS_LOG_VERSION_1, &lali->lali_version))
}
static long oal_file_ioctl(struct file *filp, unsigned int cmd,
- unsigned long arg)
+ unsigned long arg)
{
struct oal_circ_buf *ocb = filp->private_data;
case LUSTRE_ACCESS_LOG_IOCTL_VERSION:
return LUSTRE_ACCESS_LOG_VERSION_1;
case LUSTRE_ACCESS_LOG_IOCTL_INFO:
- return oal_ioctl_info(ocb, arg);
+ return oal_ioctl_info(ocb, (void __user *)arg);
case LUSTRE_ACCESS_LOG_IOCTL_FILTER:
ocb->ocb_filter = arg;
return 0;
}
static long oal_control_file_ioctl(struct file *filp, unsigned int cmd,
- unsigned long arg)
+ unsigned long arg)
{
struct oal_control_file *ccf = filp->private_data;