linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: David Howells <dhowells@redhat.com>, linux-cachefs@redhat.com
Cc: Jeffle Xu <jefflexu@linux.alibaba.com>,
	Trond Myklebust <trondmy@hammerspace.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	Steve French <smfrench@gmail.com>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Matthew Wilcox <willy@infradead.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Omar Sandoval <osandov@osandov.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org,
	linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org,
	v9fs-developer@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/11] cachefiles: set default tag name if it's unspecified
Date: Fri, 21 Jan 2022 12:51:27 -0500	[thread overview]
Message-ID: <d99c4042fa900187b179b9087981b25c22edd645.camel@kernel.org> (raw)
In-Reply-To: <164251399914.3435901.4761991152407411408.stgit@warthog.procyon.org.uk>

On Tue, 2022-01-18 at 13:53 +0000, David Howells wrote:
> From: Jeffle Xu <jefflexu@linux.alibaba.com>
> 
> fscache_acquire_cache() requires a non-empty name, while 'tag <name>'
> command is optional for cachefilesd.
> 
> Thus set default tag name if it's unspecified to avoid the regression of
> cachefilesd. The logic is the same with that before rewritten.
> 
> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: linux-cachefs@redhat.com
> ---
> 
>  fs/cachefiles/daemon.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
> index 40a792421fc1..7ac04ee2c0a0 100644
> --- a/fs/cachefiles/daemon.c
> +++ b/fs/cachefiles/daemon.c
> @@ -703,6 +703,17 @@ static int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
>  		return -EBUSY;
>  	}
>  
> +	/* Make sure we have copies of the tag string */
> +	if (!cache->tag) {
> +		/*
> +		 * The tag string is released by the fops->release()
> +		 * function, so we don't release it on error here
> +		 */
> +		cache->tag = kstrdup("CacheFiles", GFP_KERNEL);
> +		if (!cache->tag)
> +			return -ENOMEM;
> +	}
> +
>  	return cachefiles_add_cache(cache);
>  }
>  
> 
> 

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2022-01-21 17:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 13:52 [PATCH 00/11] fscache, cachefiles: Rewrite fixes/updates David Howells
2022-01-18 13:53 ` [PATCH 01/11] fscache: Fix the volume collision wait condition David Howells
2022-01-18 13:53 ` [PATCH 02/11] cachefiles: Calculate the blockshift in terms of bytes, not pages David Howells
2022-01-21 17:47   ` Jeff Layton
2022-01-18 13:53 ` [PATCH 03/11] cachefiles: set default tag name if it's unspecified David Howells
2022-01-21 17:51   ` Jeff Layton [this message]
2022-01-18 13:53 ` [PATCH 04/11] cachefiles: Make some tracepoint adjustments David Howells
2022-01-21 17:52   ` Jeff Layton
2022-01-18 13:54 ` [PATCH 05/11] cachefiles: Trace active-mark failure David Howells
2022-01-21 17:53   ` Jeff Layton
2022-01-18 13:54 ` [PATCH 06/11] cachefiles: Explain checks in a comment David Howells
2022-01-18 13:54 ` [PATCH 07/11] cachefiles: Check that the backing filesystem supports tmpfiles David Howells
2022-01-18 13:54 ` [PATCH 08/11] fscache: Add a comment explaining how page-release optimisation works David Howells
2022-01-18 13:54 ` [PATCH 09/11] vfs, fscache: Add an IS_KERNEL_FILE() macro for the S_KERNEL_FILE flag David Howells
2022-01-18 16:23   ` Christoph Hellwig
2022-01-18 17:40   ` David Howells
2022-01-19  5:20     ` Christoph Hellwig
2022-01-19  9:18     ` David Howells
2022-01-19 11:15       ` Christian Brauner
2022-01-20  9:08       ` Christoph Hellwig
2022-01-20  9:37       ` David Howells
2022-01-18 13:55 ` [PATCH 10/11] netfs: Make ops->init_rreq() optional David Howells
2022-01-18 13:55 ` [PATCH 11/11] cifs: Support fscache indexing rewrite David Howells
2022-01-19  5:31   ` Steve French
2022-01-19  8:32   ` David Howells
2022-01-19  9:48     ` Shyam Prasad N
2022-01-19 10:38     ` David Howells

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=d99c4042fa900187b179b9087981b25c22edd645.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=anna.schumaker@netapp.com \
    --cc=asmadeus@codewreck.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=osandov@osandov.com \
    --cc=smfrench@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=trondmy@hammerspace.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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 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).