linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Does swap_set_page_dirty() calling ->set_page_dirty() make sense?
@ 2012-09-17 16:35 Jan Kara
  2012-09-17 19:15 ` Hugh Dickins
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2012-09-17 16:35 UTC (permalink / raw)
  To: linux-mm

[-- 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 --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-18 10:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 16:35 Does swap_set_page_dirty() calling ->set_page_dirty() make sense? Jan Kara
2012-09-17 19:15 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).