linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Steve French <smfrench@gmail.com>
Cc: dhowells@redhat.com, CIFS <linux-cifs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: confusing fscache path
Date: Mon, 12 Jul 2021 14:20:54 +0100	[thread overview]
Message-ID: <3136371.1626096054@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAH2r5mvm5ZTyGmyuNzxWhc5ynb5LpjtdADtHVjFeF46Q5MUsFQ@mail.gmail.com>

Steve French <smfrench@gmail.com> wrote:

> The path from fscache_uncache_all_inode_pages is:
>    fscache_uncache_all_inode_pages-->__fscache_uncache_all_inode_pages
> (line 132 of fs/fscache/page.c) -->__fscache_uncache_page (locks on
> line 1120 and then on line 1141 "goto done" without unlocking it)

This bit, you mean?

	if (TestClearPageFsCache(page) &&
	    object->cache->ops->uncache_page) {
		/* the cache backend releases the cookie lock */
		fscache_stat(&fscache_n_cop_uncache_page);
		object->cache->ops->uncache_page(object, page);
		fscache_stat_d(&fscache_n_cop_uncache_page);
		goto done;
	}

Note the comment.

Here's the unlock:

	void cachefiles_uncache_page(struct fscache_object *_object, struct page *page)
		__releases(&object->fscache.cookie->lock)
	{
		struct cachefiles_object *object;

		object = container_of(_object, struct cachefiles_object, fscache);

		_enter("%p,{%lu}", object, page->index);

		spin_unlock(&object->fscache.cookie->lock);
	}

David


      reply	other threads:[~2021-07-12 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 18:09 confusing fscache path Steve French
2021-07-12 13:20 ` David Howells [this message]

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=3136371.1626096054@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfrench@gmail.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;
as well as URLs for NNTP newsgroup(s).