Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: yangerkun <yangerkun@huawei.com>
Cc: dhowells@redhat.com, sfrench@samba.org,
	gregkh@linuxfoundation.org, pc@manguebit.com,
	lsahlber@redhat.com, sprasad@microsoft.com, tom@talpey.com,
	willy@infradead.org, linux-cifs@vger.kernel.org,
	samba-technical@lists.samba.org, stable@kernel.org,
	nspmangalore@gmail.com, ematsumiya@suse.de,
	yangerkun@huaweicloud.com
Subject: Re: [PATCH v3] cifs: fix pagecache leak when do writepages
Date: Thu, 11 Sep 2025 17:25:06 +0100	[thread overview]
Message-ID: <1955609.1757607906@warthog.procyon.org.uk> (raw)
In-Reply-To: <2780505c-b531-7731-3c3d-910a22bf0802@huawei.com>

yangerkun <yangerkun@huawei.com> wrote:

> >     	if (folio->mapping != mapping ||
> >   	    !folio_test_dirty(folio)) {
> >   		start += folio_size(folio);
> > +		folio_put(folio);
> >   		folio_unlock(folio);
> >   		goto search_again;

I wonder if the put should be prior to the unlock.  It probably doesn't matter
as we keep control of the folio until both have happened.

David


  parent reply	other threads:[~2025-09-11 16:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11  3:01 [PATCH v3] cifs: fix pagecache leak when do writepages Yang Erkun
2025-09-11  3:22 ` yangerkun
2025-09-11 10:53   ` Greg KH
2025-09-11 11:09     ` yangerkun
2025-09-11 11:17       ` Greg KH
2025-09-11 11:25         ` yangerkun
2025-09-11 11:40           ` Shyam Prasad N
2025-09-11 15:45             ` Enzo Matsumiya
2025-09-11 16:40         ` Steve French
2025-09-11 17:10           ` Greg KH
2025-09-11 16:31     ` David Howells
2025-09-11 16:38       ` Greg KH
2025-09-11 16:25   ` David Howells [this message]
2025-09-11 18:17     ` Matthew Wilcox
2025-09-12  1:12       ` yangerkun

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=1955609.1757607906@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=ematsumiya@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=nspmangalore@gmail.com \
    --cc=pc@manguebit.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=stable@kernel.org \
    --cc=tom@talpey.com \
    --cc=willy@infradead.org \
    --cc=yangerkun@huawei.com \
    --cc=yangerkun@huaweicloud.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox