lkml.org 
[lkml]   [2008]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] filldir write data missing size
Date
Yoshinori Sato <ysato@users.sourceforge.jp> writes:

> "loff_t" is long long.
> But "d_off" is unsigned long.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
>
> diff --git a/fs/readdir.c b/fs/readdir.c
> index 4e026e5..01e7152
> --- a/fs/readdir.c
> +++ b/fs/readdir.c
> @@ -159,7 +159,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
> return -EOVERFLOW;
> dirent = buf->previous;
> if (dirent) {
> - if (__put_user(offset, &dirent->d_off))
> + if (__put_user((unsigned long)offset, &dirent->d_off))

Um.. __put_user() should be already doing it automatically..

> goto efault;
> }
> dirent = buf->current_dir;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


\
 
 \ /
  Last update: 2008-07-19 19:27    [W:0.066 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site