From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 3/18] ext3 set_page_dirty fix
Date: Sun, 26 May 2002 13:38:53 -0700 [thread overview]
Message-ID: <3CF147DD.B4DB4687@zip.com.au> (raw)
The set_page_dirty() in the ext3_writepage() failure path isn't right.
set_page_dirty() will alter buffer states - it's a "whole page"
dirtying.
__set_page_dirty_buffers() is emitting warnings when it refuses to set
dirty a non-uptodate buffer against a partially-mapped page.
All we want to do in there is to move the page back onto
mapping->dirty_pages, without altering the state of its buffers.
=====================================
--- 2.5.18/fs/ext3/inode.c~ext3-set_page_dirty Sun May 26 12:37:43 2002
+++ 2.5.18-akpm/fs/ext3/inode.c Sun May 26 12:37:43 2002
@@ -1327,7 +1327,13 @@ static int ext3_writepage(struct page *p
out_fail:
unlock_kernel();
- set_page_dirty(page);
+
+ /*
+ * We have to fail this writepage to avoid cross-fs transactions.
+ * Put the page back on mapping->dirty_pages, but leave its buffer's
+ * dirty state as-is.
+ */
+ __set_page_dirty_nobuffers(page);
unlock_page(page);
return ret;
}
-
reply other threads:[~2002-05-26 20:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3CF147DD.B4DB4687@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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