]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] mm: non syncing lock_page()
authorNick Piggin <npiggin@suse.de>
Tue, 26 Sep 2006 06:31:24 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:48 +0000 (08:48 -0700)
commitdb37648cd6ce9b828abd6d49aa3d269926ee7b7d
treea0155c7897f4706386d10c8718f98687bc357c82
parent28e4d965e6131ace1e813e93aebca89ac6b82dc1
[PATCH] mm: non syncing lock_page()

lock_page needs the caller to have a reference on the page->mapping inode
due to sync_page, ergo set_page_dirty_lock is obviously buggy according to
its comments.

Solve it by introducing a new lock_page_nosync which does not do a sync_page.

akpm: unpleasant solution to an unpleasant problem.  If it goes wrong it could
cause great slowdowns while the lock_page() caller waits for kblockd to
perform the unplug.  And if a filesystem has special sync_page() requirements
(none presently do), permanent hangs are possible.

otoh, set_page_dirty_lock() is usually (always?) called against userspace
pages.  They are always up-to-date, so there shouldn't be any pending read I/O
against these pages.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/pagemap.h
mm/filemap.c
mm/page-writeback.c