mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
Revert "fs: nfs: fix missing refcnt by replacing folio_set_private by folio_attach_private"
This reverts commit 03e02b9417
.
As was pointed out during code review, there is no need to use
folio_attach_private()/folio_detach_private() when a refcount to the
folio is already carried by the struct nfs_page.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
650703bc4e
commit
8f52caf9d2
@ -772,7 +772,8 @@ static void nfs_inode_add_request(struct nfs_page *req)
|
||||
nfs_lock_request(req);
|
||||
spin_lock(&mapping->i_private_lock);
|
||||
set_bit(PG_MAPPED, &req->wb_flags);
|
||||
folio_attach_private(folio, req);
|
||||
folio_set_private(folio);
|
||||
folio->private = req;
|
||||
spin_unlock(&mapping->i_private_lock);
|
||||
atomic_long_inc(&nfsi->nrequests);
|
||||
/* this a head request for a page group - mark it as having an
|
||||
@ -796,7 +797,8 @@ static void nfs_inode_remove_request(struct nfs_page *req)
|
||||
|
||||
spin_lock(&mapping->i_private_lock);
|
||||
if (likely(folio)) {
|
||||
folio_detach_private(folio);
|
||||
folio->private = NULL;
|
||||
folio_clear_private(folio);
|
||||
clear_bit(PG_MAPPED, &req->wb_head->wb_flags);
|
||||
}
|
||||
spin_unlock(&mapping->i_private_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user