-
Andrew Morton authored
From: Martin Schwidefsky <schwidefsky@de.ibm.com> The S390 hardware has the interesting characteristic that the storage key hardware which records a page's pte-dirtiness is also marked dirty when a page is modified by the disk hardware. Consequently, reading data from disk makes the page appear to be dirty and things which were read from disk need to be written back. Up to now s390 uses a special bit in the pte that is set in mk_pte for the first user of a page and makes set_pte to clear the storage key. The problem is that this is a race condition if two processes want to access the same page simultaneously. Then the page count is already > 1 in mk_pte and nobody will clear the storage key. It doesn't lead to any data loss because what happens is that a clean page is considered dirty and is written back to the disk. The worst scenario is a read only disk where this results in i/o errors (but no data loss). Martin's fix to this is to clear the page's dirty flag in SetPageUptodate(). Which seems a bit kludgey, but I cannot think of a case in which this in incorrect, inadequate or inappropriate. So...
fe51fa16