nfs: simplify nfs_folio_find_and_lock_request
authorChristoph Hellwig <hch@lst.de>
Mon, 1 Jul 2024 05:26:50 +0000 (07:26 +0200)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Jul 2024 17:47:51 +0000 (13:47 -0400)
commit9eb7c484db1ae993648fc9b9d48a295f4d99afb8
treec4af8274edc2b3dd2dc6ad846be076636e90c00d
parent02e61ec1e2c1da136bbf7f6bbabc46733c53b035
nfs: simplify nfs_folio_find_and_lock_request

nfs_folio_find_and_lock_request and the nfs_page_group_lock_head helper
called by it spend quite some effort to deal with head vs subrequests.
But given that only the head request can be stashed in the folio private
data, non of that is required.

Fold the locking logic from nfs_page_group_lock_head into
nfs_folio_find_and_lock_request and simplify the result based on the
invariant that we always find the head request in the folio private data.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_page.h