From: "Vladimir V. Saveliev" <vs@namesys.com>
To: Nick Piggin <npiggin@suse.de>
Cc: reiserfs-list@namesys.com
Subject: Re: reiserfs set_page_dirty vs truncate race?
Date: Tue, 10 Oct 2006 18:29:27 +0400 [thread overview]
Message-ID: <200610101829.28052.vs@namesys.com> (raw)
In-Reply-To: <20061010074426.GD14557@wotan.suse.de>
Hello
On Tuesday 10 October 2006 11:44, Nick Piggin wrote:
> Hi,
>
> I wonder if resierfs needs to be careful about truncated pages,
I think it is assumed that __set_page_dirty_nobuffers and __set_page_dirty_buffers care about truncated pages.
> or does
> your .invalidatepage provide synchronisation against set_page_dirty somehow?
> --
> Index: linux-2.6/fs/reiserfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/reiserfs/inode.c
> +++ linux-2.6/fs/reiserfs/inode.c
> @@ -2840,10 +2840,14 @@ static void reiserfs_invalidatepage(stru
>
> static int reiserfs_set_page_dirty(struct page *page)
> {
> - struct inode *inode = page->mapping->host;
> - if (reiserfs_file_data_log(inode)) {
> - SetPageChecked(page);
> - return __set_page_dirty_nobuffers(page);
> + struct address_space *mapping = page->mapping;
> + struct inode *inode;
> + if (mapping) {
> + inode = mapping->host;
> + if (reiserfs_file_data_log(inode)) {
> + SetPageChecked(page);
> + return __set_page_dirty_nobuffers(page);
> + }
> }
> return __set_page_dirty_buffers(page);
> }
>
>
>
next prev parent reply other threads:[~2006-10-10 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 7:44 reiserfs set_page_dirty vs truncate race? Nick Piggin
2006-10-10 14:29 ` Vladimir V. Saveliev [this message]
2006-10-10 15:08 ` Nick Piggin
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=200610101829.28052.vs@namesys.com \
--to=vs@namesys.com \
--cc=npiggin@suse.de \
--cc=reiserfs-list@namesys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.