linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steven Hand <Steven.Hand@cl.cam.ac.uk>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: Steven Hand <Steven.Hand@cl.cam.ac.uk>,
	Linux-MM@kvack.orgSteven.Hand@cl.cam.ac.uk
Subject: Re: [PATCH] bugfix for drivers/char/mem.c
Date: Mon, 02 Aug 1999 14:27:05 +0100	[thread overview]
Message-ID: <E11BI7Q-000048-00@heaton.cl.cam.ac.uk> (raw)
In-Reply-To: Your message of "Sun, 01 Aug 1999 11:23:30 PDT." <199908011823.LAA32354@google.engr.sgi.com>

>I see the problem. Can I suggest a simpler fix, based on the fact 
>that vread() returns 0 when count == 0?
>
>-	*ppos += p + virtr;
>+	*ppos += read + virtr;

Sure if you prefer it. 

The main reason I added the if(count) { ... } was just to avoid 
calling vread() when count is zero (since in this case there's no 
entry to find on the vmlist, and hence the for loop in vread() will 
just iterate over all vmalloc()'d areas before returning zero.)


S.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

      reply	other threads:[~1999-08-02 13:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-01 10:55 Steven Hand
1999-08-01 18:23 ` Kanoj Sarcar
1999-08-02 13:27   ` Steven Hand [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=E11BI7Q-000048-00@heaton.cl.cam.ac.uk \
    --to=steven.hand@cl.cam.ac.uk \
    --cc=Linux-MM@kvack.orgSteven.Hand \
    --cc=kanoj@google.engr.sgi.com \
    /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