Commit dfc2505c authored by Alexander Viro's avatar Alexander Viro Committed by David Woodhouse

[PATCH] sparse: reiserfs annotation

Everything straigthforward and takes care of almost all sparse warnings
in fs/reiserfs/*.
parent 67475a9f
...@@ -545,7 +545,7 @@ int reiserfs_copy_from_user_to_file_region( ...@@ -545,7 +545,7 @@ int reiserfs_copy_from_user_to_file_region(
array to array to
prepared pages prepared pages
*/ */
const char *buf /* Pointer to user-supplied const char __user *buf /* Pointer to user-supplied
data*/ data*/
) )
{ {
...@@ -1062,7 +1062,7 @@ int reiserfs_prepare_file_region_for_write( ...@@ -1062,7 +1062,7 @@ int reiserfs_prepare_file_region_for_write(
*/ */
ssize_t reiserfs_file_write( struct file *file, /* the file we are going to write into */ ssize_t reiserfs_file_write( struct file *file, /* the file we are going to write into */
const char *buf, /* pointer to user supplied data const char __user *buf, /* pointer to user supplied data
(in userspace) */ (in userspace) */
size_t count, /* amount of bytes to write */ size_t count, /* amount of bytes to write */
loff_t *ppos /* pointer to position in file that we start writing at. Should be updated to loff_t *ppos /* pointer to position in file that we start writing at. Should be updated to
......
...@@ -36,7 +36,7 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, ...@@ -36,7 +36,7 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
case REISERFS_IOC_GETFLAGS: case REISERFS_IOC_GETFLAGS:
flags = REISERFS_I(inode) -> i_attrs; flags = REISERFS_I(inode) -> i_attrs;
i_attrs_to_sd_attrs( inode, ( __u16 * ) &flags ); i_attrs_to_sd_attrs( inode, ( __u16 * ) &flags );
return put_user(flags, (int *) arg); return put_user(flags, (int __user *) arg);
case REISERFS_IOC_SETFLAGS: { case REISERFS_IOC_SETFLAGS: {
if (IS_RDONLY(inode)) if (IS_RDONLY(inode))
return -EROFS; return -EROFS;
...@@ -44,7 +44,7 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, ...@@ -44,7 +44,7 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
return -EPERM; return -EPERM;
if (get_user(flags, (int *) arg)) if (get_user(flags, (int __user *) arg))
return -EFAULT; return -EFAULT;
if ( ( ( flags ^ REISERFS_I(inode) -> i_attrs) & ( REISERFS_IMMUTABLE_FL | REISERFS_APPEND_FL)) && if ( ( ( flags ^ REISERFS_I(inode) -> i_attrs) & ( REISERFS_IMMUTABLE_FL | REISERFS_APPEND_FL)) &&
...@@ -66,13 +66,13 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, ...@@ -66,13 +66,13 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
return 0; return 0;
} }
case REISERFS_IOC_GETVERSION: case REISERFS_IOC_GETVERSION:
return put_user(inode->i_generation, (int *) arg); return put_user(inode->i_generation, (int __user *) arg);
case REISERFS_IOC_SETVERSION: case REISERFS_IOC_SETVERSION:
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
return -EPERM; return -EPERM;
if (IS_RDONLY(inode)) if (IS_RDONLY(inode))
return -EROFS; return -EROFS;
if (get_user(inode->i_generation, (int *) arg)) if (get_user(inode->i_generation, (int __user *) arg))
return -EFAULT; return -EFAULT;
inode->i_ctime = CURRENT_TIME; inode->i_ctime = CURRENT_TIME;
mark_inode_dirty(inode); mark_inode_dirty(inode);
......
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