mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
fs: fix kernel_read prototype
Use proper ssize_t and size_t types for the return value and count argument, move the offset last and make it an in/out argument like all other read/write helpers, and make the buf argument a void pointer to get rid of lots of casts in the callers. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
c41fbad015
commit
bdd1d2d3d2
17 changed files with 69 additions and 71 deletions
|
|
@ -368,9 +368,10 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx)
|
|||
goto out;
|
||||
|
||||
while (1) {
|
||||
loff_t pos = ctx->pos - 2;
|
||||
|
||||
/* read entries from the directory file */
|
||||
ret = kernel_read(host_file, ctx->pos - 2, (char *)vdir,
|
||||
sizeof(*vdir));
|
||||
ret = kernel_read(host_file, vdir, sizeof(*vdir), &pos);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: read dir %s failed %d\n",
|
||||
__func__, coda_f2s(&cii->c_fid), ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue