]> 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)
commit042bc7d404b3810bba7fa0fe59e26d8e95807314
treea585cc16cd1048525726b27076700e11eb4b126d
parenta9aced02878edb5be5025c6bb8fd0aaf374e24a9
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