summaryrefslogtreecommitdiff
path: root/include/trace/events
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2011-05-11 15:13:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-11 18:50:45 -0700
commit59a16ead572330deb38e5848151d30ed1af754bc (patch)
tree792b1f35e11e0f49170b0d306d45706de54afeae /include/trace/events
parent778dd893ae785c5fd505dac30b5fc40aae188bf1 (diff)
tmpfs: fix spurious ENOSPC when racing with unswap
Testing the shmem_swaplist replacements for igrab() revealed another bug: writes to /dev/loop0 on a tmpfs file which fills its filesystem were sometimes failing with "Buffer I/O error"s. These came from ENOSPC failures of shmem_getpage(), when racing with swapoff: the same could happen when racing with another shmem_getpage(), pulling the page in from swap in between our find_lock_page() and our taking the info->lock (though not in the single-threaded loop case). This is unacceptable, and surprising that I've not noticed it before: it dates back many years, but (presumably) was made a lot easier to reproduce in 2.6.36, which sited a page preallocation in the race window. Fix it by rechecking the page cache before settling on an ENOSPC error. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/trace/events')
0 files changed, 0 insertions, 0 deletions