Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: "Yue Hu" <huyue2@coolpad.com>
Cc: <dhowells@redhat.com>, <sfrench@samba.org>,
	<trond.myklebust@hammerspace.com>, <anna@kernel.org>,
	<linux-cachefs@redhat.com>, <linux-cifs@vger.kernel.org>,
	<samba-technical@lists.samba.org>, <linux-nfs@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <zbestahu@163.com>,
	<zhangwen@coolpad.com>
Subject: Re: [PATCH] fscache: Expose fscache_end_operation() helper
Date: Sat, 2 Apr 2022 17:32:21 +0800	[thread overview]
Message-ID: <20220402173221.00002170.zbestahu@gmail.com> (raw)
In-Reply-To: <20220402021841.22285-1-huyue2@coolpad.com>

On Sat, 02 Apr 2022 10:18:55 +0800
"Yue Hu" <huyue2@coolpad.com> wrote:

> Currently, nfs and cifs have same fscache_end_operaion() as fscache.
> We may put the helper in linux/fscache.h so that fscache internal
> and client filesystem can all use it.

Sorry, please ignore the patch due to my earlier code base.

Thanks.

> 
> Signed-off-by: Yue Hu <huyue2@coolpad.com>
> ---
>  fs/cifs/fscache.c       |  8 --------
>  fs/fscache/internal.h   | 11 -----------
>  fs/nfs/fscache.c        |  8 --------
>  include/linux/fscache.h | 12 ++++++++++++
>  4 files changed, 12 insertions(+), 27 deletions(-)
> 
> diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
> index 33af72e0ac0c..b47c2011ce5b 100644
> --- a/fs/cifs/fscache.c
> +++ b/fs/cifs/fscache.c
> @@ -134,14 +134,6 @@ void cifs_fscache_release_inode_cookie(struct inode *inode)
>  	}
>  }
>  
> -static inline void fscache_end_operation(struct netfs_cache_resources *cres)
> -{
> -	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
> -
> -	if (ops)
> -		ops->end_operation(cres);
> -}
> -
>  /*
>   * Fallback page reading interface.
>   */
> diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
> index f121c21590dc..ed1c9ed737f2 100644
> --- a/fs/fscache/internal.h
> +++ b/fs/fscache/internal.h
> @@ -70,17 +70,6 @@ static inline void fscache_see_cookie(struct fscache_cookie *cookie,
>  			     where);
>  }
>  
> -/*
> - * io.c
> - */
> -static inline void fscache_end_operation(struct netfs_cache_resources *cres)
> -{
> -	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
> -
> -	if (ops)
> -		ops->end_operation(cres);
> -}
> -
>  /*
>   * main.c
>   */
> diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
> index cfe901650ab0..39654ca72d3d 100644
> --- a/fs/nfs/fscache.c
> +++ b/fs/nfs/fscache.c
> @@ -249,14 +249,6 @@ void nfs_fscache_release_file(struct inode *inode, struct file *filp)
>  	}
>  }
>  
> -static inline void fscache_end_operation(struct netfs_cache_resources *cres)
> -{
> -	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
> -
> -	if (ops)
> -		ops->end_operation(cres);
> -}
> -
>  /*
>   * Fallback page reading interface.
>   */
> diff --git a/include/linux/fscache.h b/include/linux/fscache.h
> index 296c5f1d9f35..79bb40b92e0f 100644
> --- a/include/linux/fscache.h
> +++ b/include/linux/fscache.h
> @@ -557,6 +557,18 @@ int fscache_write(struct netfs_cache_resources *cres,
>  	return ops->write(cres, start_pos, iter, term_func, term_func_priv);
>  }
>  
> +/*
> + * Clean up at the end of an operation
> + */
> +static inline
> +void fscache_end_operation(struct netfs_cache_resources *cres)
> +{
> +	const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
> +
> +	if (ops)
> +		ops->end_operation(cres);
> +}
> +
>  /**
>   * fscache_clear_page_bits - Clear the PG_fscache bits from a set of pages
>   * @cookie: The cookie representing the cache object


           reply	other threads:[~2022-04-02  9:33 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220402021841.22285-1-huyue2@coolpad.com>]

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=20220402173221.00002170.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=anna@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=huyue2@coolpad.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=zbestahu@163.com \
    --cc=zhangwen@coolpad.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