From: Jan Kara <jack@suse.cz>
To: linux-mm@kvack.org
Subject: Does swap_set_page_dirty() calling ->set_page_dirty() make sense?
Date: Mon, 17 Sep 2012 18:35:18 +0200 [thread overview]
Message-ID: <20120917163518.GD9150@quack.suse.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
Hi,
I tripped over a crash in reiserfs which happened due to PageSwapCache
page being passed to reiserfs_set_page_dirty(). Now it's not that hard to
make reiserfs_set_page_dirty() check that case but I really wonder: Does it
make sense to call mapping->a_ops->set_page_dirty() for a PageSwapCache
page? The page is going to be written via direct IO so from the POV of the
filesystem there's no need for any dirtiness tracking. Also there are
several ->set_page_dirty() implementations which will spectacularly crash
because they do things like page->mapping->host, or call
__set_page_dirty_buffers() which expects buffer heads in page->private.
Or what is the reason for calling filesystem's set_page_dirty() function?
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
[-- Attachment #2: 0001-mm-Remove-swap_set_page_dirty.patch --]
[-- Type: text/x-patch, Size: 0 bytes --]
next reply other threads:[~2012-09-17 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 16:35 Jan Kara [this message]
2012-09-17 19:15 ` Does swap_set_page_dirty() calling ->set_page_dirty() make sense? Hugh Dickins
2012-09-18 2:16 ` Jan Kara
2012-09-18 8:51 ` Petr Tesarik
2012-09-18 10:02 ` Mel Gorman
2012-09-18 9:58 ` Mel Gorman
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=20120917163518.GD9150@quack.suse.cz \
--to=jack@suse.cz \
--cc=linux-mm@kvack.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 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.