All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH v3 2/8] NFS: Fix an I/O request leakage in nfs_do_recoalesce
Date: Tue, 19 Feb 2019 08:53:05 -0500	[thread overview]
Message-ID: <20190219135311.119300-3-trond.myklebust@hammerspace.com> (raw)
In-Reply-To: <20190219135311.119300-2-trond.myklebust@hammerspace.com>

Whether we need to exit early, or just reprocess the list, we
must not lost track of the request which failed to get recoalesced.

Fixes: 03d5eb65b538 ("NFS: Fix a memory leak in nfs_do_recoalesce")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.0+
---
 fs/nfs/pagelist.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 301880a3ad8e..03bde9a41451 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -1092,7 +1092,6 @@ static int nfs_do_recoalesce(struct nfs_pageio_descriptor *desc)
 			struct nfs_page *req;
 
 			req = list_first_entry(&head, struct nfs_page, wb_list);
-			nfs_list_remove_request(req);
 			if (__nfs_pageio_add_request(desc, req))
 				continue;
 			if (desc->pg_error < 0) {
-- 
2.20.1


  reply	other threads:[~2019-02-19 13:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 13:53 [PATCH v3 0/8] NFS file I/O bugfixes and cleanups Trond Myklebust
2019-02-19 13:53 ` [PATCH v3 1/8] NFS: Fix I/O request leakages Trond Myklebust
2019-02-19 13:53   ` Trond Myklebust [this message]
2019-02-19 13:53     ` [PATCH v3 3/8] NFS: Don't recoalesce on error in nfs_pageio_complete_mirror() Trond Myklebust
2019-02-19 13:53       ` [PATCH v3 4/8] NFS: Clean up list moves of struct nfs_page Trond Myklebust
2019-02-19 13:53         ` [PATCH v3 5/8] NFS: Pass error information to the pgio error cleanup routine Trond Myklebust
2019-02-19 13:53           ` [PATCH v3 6/8] NFS: Ensure NFS writeback allocations don't recurse back into NFS Trond Myklebust
2019-02-19 13:53             ` [PATCH v3 7/8] NFS: EINTR is also a fatal error Trond Myklebust
2019-02-19 13:53               ` [PATCH v3 8/8] NFS: ENOMEM should also be " Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190219135311.119300-3-trond.myklebust@hammerspace.com \
    --to=trondmy@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.