]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Avoid a deadlock situation on write
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 20 May 2007 14:18:27 +0000 (10:18 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 24 May 2007 14:44:20 +0000 (10:44 -0400)
commitcdd4e84e170503b9fa602e8e4f3d48c11713404d
treec506bd7dcacc9d5b25b3295bd1f327e534532c54
parent41e74b5cfdb0b934e6c0f03b3472a50f6c8f8f77
NFS: Avoid a deadlock situation on write

When processes are allowed to attempt to lock a non-contiguous range of nfs
write requests, it is possible for generic_writepages to 'wrap round' the
address space, and call writepage() on a request that is already locked by
the same process.

We avoid the deadlock by checking if the page index is contiguous with the
list of nfs write requests that is already held in our
nfs_pageio_descriptor prior to attempting to lock a new request.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_page.h