From: Andrew Morton <akpm@zip.com.au>
To: alad@hss.hns.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Mapped pages handling in shrink_cache()
Date: Sat, 29 Dec 2001 02:58:17 -0800 [thread overview]
Message-ID: <3C2DA1C9.8EB54896@zip.com.au> (raw)
In-Reply-To: <65256B31.0038FC61.00@sandesh.hss.hns.com>
alad@hss.hns.com wrote:
>
> Hi, In the following code from shrink_cache()
>
> if (PageDirty(page) && is_page_cache_freeable(page) && page->mapping)
> {
> .
> .
> .
>
> int (*writepage)(struct page *);
>
> writepage = page->mapping->a_ops->writepage;
> if ((gfp_mask & __GFP_FS) && writepage) {
> ClearPageDirty(page);
> SetPageLaunder(page);
> page_cache_get(page);
> spin_unlock(&pagemap_lru_lock);
>
> writepage(page);
> page_cache_release(page);
>
> spin_lock(&pagemap_lru_lock);
> continue; <<<<<<< shouldn't the page be unlocked before
> continuing with the next page <<<<<
> }
>
The page is unlocked when IO completes, in interrupt context.
See end_buffer_io_async().
prev parent reply other threads:[~2001-12-29 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-29 10:17 Mapped pages handling in shrink_cache() alad
2001-12-29 10:58 ` 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=3C2DA1C9.8EB54896@zip.com.au \
--to=akpm@zip.com.au \
--cc=alad@hss.hns.com \
--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