summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-10 00:08:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-10 00:08:49 -0700
commit9008d35b80e72edc52a2f3d64cefe4e2ee858329 (patch)
treeb0916207b9f08fbf39c45e9de18d5c96c69bebbb /include/linux/blkdev.h
parentd755344394bdf8304e563f46479687c37aec1716 (diff)
[PATCH] hugepage: fix add_to_page_cache() error handling
From: David Gibson <david@gibson.dropbear.id.au> add_to_page_cache() locks the given page if and only if it suceeds. The hugepage code (every arch), however, does an unlock_page() after add_to_page_cache() before checking the return code, which could trip the BUG() in unlock_page() if add_to_page_cache() failed. In practice we've never hit this bug, because the only ways add_to_page_cache() can fail are when we fail to allocate a radix tree node (very rare), or when there is already a page at that offset in the radix tree, which never happens during prefault, obviously. We should probably fix it anyway, though. The analagous bug in some of the patches floating about to demand-allocation of hugepages is more of a problem, because multiple processes can race to instantiate a particular page in the radix tree - that's been hit at least once (which is how I found this).
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions