Commit 4c6243ec authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/llite: Properly mark ll_obd_statfs argument as __user

Also update all callers.
This fixes a bunch of address space mismatch warnings from sparse.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0dd48a43
...@@ -1434,7 +1434,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1434,7 +1434,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LL_IOC_LOV_SWAP_LAYOUTS: case LL_IOC_LOV_SWAP_LAYOUTS:
return -EPERM; return -EPERM;
case LL_IOC_OBD_STATFS: case LL_IOC_OBD_STATFS:
return ll_obd_statfs(inode, (void *)arg); return ll_obd_statfs(inode, (void __user *)arg);
case LL_IOC_LOV_GETSTRIPE: case LL_IOC_LOV_GETSTRIPE:
case LL_IOC_MDC_GETINFO: case LL_IOC_MDC_GETINFO:
case IOC_MDC_GETFILEINFO: case IOC_MDC_GETFILEINFO:
......
...@@ -2278,7 +2278,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2278,7 +2278,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LL_IOC_GROUP_UNLOCK: case LL_IOC_GROUP_UNLOCK:
return ll_put_grouplock(inode, file, arg); return ll_put_grouplock(inode, file, arg);
case IOC_OBD_STATFS: case IOC_OBD_STATFS:
return ll_obd_statfs(inode, (void *)arg); return ll_obd_statfs(inode, (void __user *)arg);
/* We need to special case any other ioctls we want to handle, /* We need to special case any other ioctls we want to handle,
* to send them to the MDS/OST as appropriate and to properly * to send them to the MDS/OST as appropriate and to properly
......
...@@ -782,7 +782,7 @@ int ll_show_options(struct seq_file *seq, struct dentry *dentry); ...@@ -782,7 +782,7 @@ int ll_show_options(struct seq_file *seq, struct dentry *dentry);
void ll_dirty_page_discard_warn(struct page *page, int ioret); void ll_dirty_page_discard_warn(struct page *page, int ioret);
int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
struct super_block *, struct lookup_intent *); struct super_block *, struct lookup_intent *);
int ll_obd_statfs(struct inode *inode, void *arg); int ll_obd_statfs(struct inode *inode, void __user *arg);
int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize); int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize);
int ll_get_default_mdsize(struct ll_sb_info *sbi, int *default_mdsize); int ll_get_default_mdsize(struct ll_sb_info *sbi, int *default_mdsize);
int ll_process_config(struct lustre_cfg *lcfg); int ll_process_config(struct lustre_cfg *lcfg);
......
...@@ -2019,7 +2019,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, ...@@ -2019,7 +2019,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
return rc; return rc;
} }
int ll_obd_statfs(struct inode *inode, void *arg) int ll_obd_statfs(struct inode *inode, void __user *arg)
{ {
struct ll_sb_info *sbi = NULL; struct ll_sb_info *sbi = NULL;
struct obd_export *exp; struct obd_export *exp;
......
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