Commit e543d2ea authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman

staging/lustre/libcfs: cleanup libcfs_kkuc_msg_put a bit

No need to cast count since it is already ssize_t. No need
to cast payload to const, but need __force instead to avoid
Sparse complaining.
Reported-and-Suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92ab7d7f
......@@ -170,8 +170,8 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload)
fs = get_fs();
set_fs(KERNEL_DS);
while ((ssize_t)count > 0) {
rc = vfs_write(filp, (const void __user *)payload,
while (count > 0) {
rc = vfs_write(filp, (void __force __user *)payload,
count, &offset);
if (rc < 0)
break;
......
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