Use set_page_writeback and end_page_writeback
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 21 Oct 2009 22:17:15 +0000 (23:17 +0100)
committerDerrick Brashear <shadow|account-1000005@unknown>
Fri, 13 Nov 2009 03:27:07 +0000 (19:27 -0800)
commit5e99d56cf2a8c4c9789bc7ace04a804d07e6238f
tree5204c3702731d98e0fd7716df5c489ad8428a752
parentdc85abcaa6e3423452078e36bbfcd281e613c407
Use set_page_writeback and end_page_writeback

Calling set_page_writeback and end_page_writeback is necessary to
ensure that the dirty page radix tree and the page dirty flags
tally. The results of end_page_writeback are also used by the
bdi code to prioritise writeback. The Linux kernel
documentation contains further warnings of doom for what may
happen due to not calling them.

Adding set_page_writeback and end_page_writeback also allows us to
unlock the page earlier (the page can be locked any time after the
writeback flag is set). This means that we're not calling the
backing filesystem's ->write function with our pages locked, and
should help reduce contention and the potential for deadlocks there.

Change-Id: I9130b2ad9a09c6b9b16a0f63d7b4a614a93de8d3
Reviewed-on: http://gerrit.openafs.org/819
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c