From: Nick Piggin <npiggin@suse.de>
To: reiserfs-list@namesys.com
Subject: reiserfs set_page_dirty vs truncate race?
Date: Tue, 10 Oct 2006 09:44:26 +0200 [thread overview]
Message-ID: <20061010074426.GD14557@wotan.suse.de> (raw)
Hi,
I wonder if resierfs needs to be careful 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 reply other threads:[~2006-10-10 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 7:44 Nick Piggin [this message]
2006-10-10 14:29 ` reiserfs set_page_dirty vs truncate race? Vladimir V. Saveliev
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=20061010074426.GD14557@wotan.suse.de \
--to=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.