From: "Dave Young" <hidave.darkstar@gmail.com>
To: "rae l" <crquan@gmail.com>
Cc: "Miklos Szeredi" <miklos@szeredi.hu>,
fuse-devel@lists.sourceforge.net, viro@zeniv.linux.org.uk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/fuse/dev.c: use zero_user_page instead
Date: Fri, 20 Jul 2007 10:16:05 +0000 [thread overview]
Message-ID: <a8e1da0707200316y68fdbb39o8b21d3ebdefa5c05@mail.gmail.com> (raw)
In-Reply-To: <91b13c310707200312j17ec110bm20c100e5861b1758@mail.gmail.com>
>On 7/20/07, rae l <crquan@gmail.com> wrote:
> On 7/20/07, Dave Young <hidave.darkstar@gmail.com> wrote:
> > > - if (page && zeroing && count < PAGE_SIZE) {
> > > - void *mapaddr = kmap_atomic(page, KM_USER1);
> > > - memset(mapaddr, 0, PAGE_SIZE);
> > > - kunmap_atomic(mapaddr, KM_USER1);
> > > - }
> > > + if (page && zeroing && count < PAGE_SIZE)
> > > + zero_user_page(page, 0, PAGE_SIZE, KM_USER1);
> > Why clear all page? IMHO,only count bytes need to be cleared.
> The original one is memset(mapaddr, 0, PAGE_SIZE), namely clear the whole page.
Yes, I have same suspicion with original code.
>
> --
> Denis Cheng
> Linux Application Developer
>
> "One of my most productive days was throwing away 1000 lines of code."
> - Ken Thompson.
>
prev parent reply other threads:[~2007-07-20 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 9:37 Denis Cheng
2007-07-20 10:09 ` Dave Young
2007-07-20 10:12 ` rae l
2007-07-20 10:16 ` Dave Young [this message]
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=a8e1da0707200316y68fdbb39o8b21d3ebdefa5c05@mail.gmail.com \
--to=hidave.darkstar@gmail.com \
--cc=crquan@gmail.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®