]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Further optimise nfs_lock_and_join_requests()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 19 Jul 2017 12:23:10 +0000 (08:23 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 15 Aug 2017 15:54:47 +0000 (11:54 -0400)
commit8450d55253cfe4fd21a5b4a6a835f9c6ab8b1c11
treea585cc16cd1048525726b27076700e11eb4b126d
parent2e181771ac2a0c398fcf7e5ab0d17379dbff68b5
NFS: Further optimise nfs_lock_and_join_requests()

When locking the entire group in order to remove subrequests,
the locks are always taken in order, and with the page group
lock being taken after the page head is locked. The intention
is that:

1) The lock on the group head guarantees that requests may not
   be removed from the group (although new entries could be appended
   if we're not holding the group lock).
2) It is safe to drop and retake the page group lock while iterating
   through the list, in particular when waiting for a subrequest lock.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/write.c