nfs: remove nfs_folio_private_request

JIRA: https://issues.redhat.com/browse/RHEL-59704
Conflicts:
	fs/nfs/write.c: Context difference due to RHEL not having
	600f111ef51d ("fs: Rename mapping private members")

commit 02e61ec1e2c1da136bbf7f6bbabc46733c53b035
Author: Christoph Hellwig <hch@lst.de>
Date:   Mon Jul 1 07:26:49 2024 +0200

    nfs: remove nfs_folio_private_request

    nfs_folio_private_request is a trivial wrapper around, which itself has
    fallen out of favor and has been replaced with plain ->private
    dereferences in recent folio conversions.  Do the same for nfs.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
This commit is contained in:
Scott Mayhew 2024-09-23 16:32:25 -04:00
parent 852fd33f32
commit 62befa2ea1
1 changed files with 2 additions and 7 deletions

View File

@ -168,11 +168,6 @@ nfs_cancel_remove_inode(struct nfs_page *req, struct inode *inode)
return 0;
}
static struct nfs_page *nfs_folio_private_request(struct folio *folio)
{
return folio_get_private(folio);
}
/**
* nfs_folio_find_head_request - find head request associated with a folio
* @folio: pointer to folio
@ -189,7 +184,7 @@ static struct nfs_page *nfs_folio_find_head_request(struct folio *folio)
if (!folio_test_private(folio))
return NULL;
spin_lock(&mapping->private_lock);
req = nfs_folio_private_request(folio);
req = folio->private;
if (req) {
WARN_ON_ONCE(req->wb_head != req);
kref_get(&req->wb_kref);
@ -219,7 +214,7 @@ static struct nfs_page *nfs_folio_find_and_lock_request(struct folio *folio)
return ERR_PTR(ret);
}
/* Ensure that nobody removed the request before we locked it */
if (head == nfs_folio_private_request(folio))
if (head == folio->private)
break;
nfs_unlock_and_release_request(head);
}