mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: linux-kernel@vger.kernel.org
Cc: timur.tabi@ammasso.com, roland@topspin.com
Subject: Re: Correct way to release get_user_pages()?
Date: Mon, 31 Jan 2005 13:01:04 -0800	[thread overview]
Message-ID: <20050131130104.4ac732e5.akpm@osdl.org> (raw)
In-Reply-To: <41FE53EA.4010101@ammasso.com>

Timur Tabi <timur.tabi@ammasso.com> wrote:
>
> Andrew Morton wrote:
> 
> > no...  You should only dirty the page if it was modified, and then use
> > set_page_dirty() or set_page_dirty_lock().
> 
> If the page was modified, then shouldn't it already be marked dirty?

If the page is modified by a DMA transfer or by the CPU via the kernel's
page mappings then there is no record of its having been altered.  Which is
why we must do it in software.

> Also, should I always use set_page_dirty_lock() if I haven't already 
> locked the page?

If you don't have a reference on the page's inode, yes, you should use
set_page_dirty_lock().  If the page came from get_user_pages() then surely
you don't have a ref on the inode.

      reply	other threads:[~2005-01-31 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28  3:02 Roland Dreier
2005-01-28 17:48 ` Timur Tabi
2005-01-30 10:10   ` Andrew Morton
2005-01-31 15:51     ` Timur Tabi
2005-01-31 21:01       ` Andrew Morton [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=20050131130104.4ac732e5.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@topspin.com \
    --cc=timur.tabi@ammasso.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

Powered by JetHome