public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] filldir write data missing size
Date: Fri, 18 Jul 2008 23:18:46 -0400	[thread overview]
Message-ID: <87k5fi4l49.wl%ysato@users.sourceforge.jp> (raw)

"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))
 			goto efault;
 	}
 	dirent = buf->current_dir;

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

             reply	other threads:[~2008-07-19  4:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-19  3:18 Yoshinori Sato [this message]
2008-07-19 17:24 ` [PATCH] filldir write data missing size OGAWA Hirofumi
2008-07-19 18:28   ` Yoshinori Sato
2008-07-19 20:11     ` OGAWA Hirofumi
2008-07-21 15:48       ` Yoshinori Sato
2008-07-21 21:31         ` OGAWA Hirofumi
2008-07-28 18:58           ` Yoshinori Sato
2008-07-28 19:07           ` Paul Mundt
2008-07-28 20:14             ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5fi4l49.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox