mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: matt@theBachChoir.org.uk (Matt Bernstein),
	hpa@transmeta.com (H. Peter Anvin),
	alan@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: NFSv3 and linux-2.4.10-ac3 => oops
Date: Tue, 2 Oct 2001 16:03:57 +0200	[thread overview]
Message-ID: <15289.51533.788916.244457@charged.uio.no> (raw)
In-Reply-To: <E15oPv4-0004gl-00@the-village.bc.nu>
In-Reply-To: <15289.44299.915454.3729@charged.uio.no> <E15oPv4-0004gl-00@the-village.bc.nu>

>>>>> " " == Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

    >> what I can see, Alan merged that particular patch into
    >> 2.4.9-ac11 (but without merging in the related changes to
    >> linux/mm/filemap.c).

     > Ok its probably better I merge the related mm/filemap.c changes
     > if someone has the relevant bits handy. That helps to keep the
     > differences down

The following ought to be sufficient.

Cheers,
   Trond

--- linux-2.4.10-ac/mm/filemap.c	Tue Oct  2 15:53:04 2001
+++ linux-2.4.10-new/mm/filemap.c	Tue Oct  2 15:56:29 2001
@@ -2673,10 +2673,10 @@
 			PAGE_BUG(page);
 		}
 
+		kaddr = kmap(page);
 		status = mapping->a_ops->prepare_write(file, page, offset, offset+bytes);
 		if (status)
 			goto sync_failure;
-		kaddr = page_address(page);
 		status = __copy_from_user(kaddr+offset, buf, bytes);
 		flush_dcache_page(page);
 		if (status) {
@@ -2695,6 +2695,7 @@
 			buf += status;
 		}
 unlock:
+		kunmap(page);
 		/* Mark it unlocked again and drop the page.. */
 		UnlockPage(page);
 		if (deactivate)
@@ -2728,9 +2729,9 @@
 fail_write:
 	status = -EFAULT;
 	ClearPageUptodate(page);
-	kunmap(page);
 	goto unlock;
 sync_failure:
+	kunmap(page);
 	UnlockPage(page);
 	deactivate_page(page);
 	page_cache_release(page);

      parent reply	other threads:[~2001-10-02 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-01 23:40 H. Peter Anvin
2001-10-02  9:40 ` Trond Myklebust
2001-10-02 11:32   ` Matt Bernstein
2001-10-02 13:47     ` Alan Cox
2001-10-02 14:02       ` Matt Bernstein
2001-10-02 12:03   ` Trond Myklebust
2001-10-02 13:49     ` Alan Cox
2001-10-02 14:03     ` Trond Myklebust [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=15289.51533.788916.244457@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=alan@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hpa@transmeta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@theBachChoir.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®