public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fold __xfs_trans_roll into xfs_trans_roll
@ 2017-04-05 18:53 Christoph Hellwig
  2017-04-05 21:48 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2017-04-05 18:53 UTC (permalink / raw)
  To: linux-xfs

No one cares about the low-level helper anymore.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_trans.c | 17 ++---------------
 fs/xfs/xfs_trans.h |  1 -
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index a280e126491f..be86e4ed23d5 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1034,17 +1034,14 @@ xfs_trans_cancel(
  * chunk we've been working on and get a new transaction to continue.
  */
 int
-__xfs_trans_roll(
+xfs_trans_roll(
 	struct xfs_trans	**tpp,
-	struct xfs_inode	*dp,
-	int			*committed)
+	struct xfs_inode	*dp)
 {
 	struct xfs_trans	*trans;
 	struct xfs_trans_res	tres;
 	int			error;
 
-	*committed = 0;
-
 	/*
 	 * Ensure that the inode is always logged.
 	 */
@@ -1070,7 +1067,6 @@ __xfs_trans_roll(
 	if (error)
 		return error;
 
-	*committed = 1;
 	trans = *tpp;
 
 	/*
@@ -1093,12 +1089,3 @@ __xfs_trans_roll(
 		xfs_trans_ijoin(trans, dp, 0);
 	return 0;
 }
-
-int
-xfs_trans_roll(
-	struct xfs_trans	**tpp,
-	struct xfs_inode	*dp)
-{
-	int			committed;
-	return __xfs_trans_roll(tpp, dp, &committed);
-}
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 2a9292df6640..a07acbf0bd8a 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -228,7 +228,6 @@ int		xfs_trans_free_extent(struct xfs_trans *,
 				      struct xfs_efd_log_item *, xfs_fsblock_t,
 				      xfs_extlen_t, struct xfs_owner_info *);
 int		xfs_trans_commit(struct xfs_trans *);
-int		__xfs_trans_roll(struct xfs_trans **, struct xfs_inode *, int *);
 int		xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
 void		xfs_trans_cancel(xfs_trans_t *);
 int		xfs_trans_ail_init(struct xfs_mount *);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: fold __xfs_trans_roll into xfs_trans_roll
  2017-04-05 18:53 [PATCH] xfs: fold __xfs_trans_roll into xfs_trans_roll Christoph Hellwig
@ 2017-04-05 21:48 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2017-04-05 21:48 UTC (permalink / raw)
  To: Christoph Hellwig, linux-xfs

On 4/5/17 1:53 PM, Christoph Hellwig wrote:
> No one cares about the low-level helper anymore.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

"Nobody cares" sounds so cold-hearted.  ;)

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  fs/xfs/xfs_trans.c | 17 ++---------------
>  fs/xfs/xfs_trans.h |  1 -
>  2 files changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
> index a280e126491f..be86e4ed23d5 100644
> --- a/fs/xfs/xfs_trans.c
> +++ b/fs/xfs/xfs_trans.c
> @@ -1034,17 +1034,14 @@ xfs_trans_cancel(
>   * chunk we've been working on and get a new transaction to continue.
>   */
>  int
> -__xfs_trans_roll(
> +xfs_trans_roll(
>  	struct xfs_trans	**tpp,
> -	struct xfs_inode	*dp,
> -	int			*committed)
> +	struct xfs_inode	*dp)
>  {
>  	struct xfs_trans	*trans;
>  	struct xfs_trans_res	tres;
>  	int			error;
>  
> -	*committed = 0;
> -
>  	/*
>  	 * Ensure that the inode is always logged.
>  	 */
> @@ -1070,7 +1067,6 @@ __xfs_trans_roll(
>  	if (error)
>  		return error;
>  
> -	*committed = 1;
>  	trans = *tpp;
>  
>  	/*
> @@ -1093,12 +1089,3 @@ __xfs_trans_roll(
>  		xfs_trans_ijoin(trans, dp, 0);
>  	return 0;
>  }
> -
> -int
> -xfs_trans_roll(
> -	struct xfs_trans	**tpp,
> -	struct xfs_inode	*dp)
> -{
> -	int			committed;
> -	return __xfs_trans_roll(tpp, dp, &committed);
> -}
> diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
> index 2a9292df6640..a07acbf0bd8a 100644
> --- a/fs/xfs/xfs_trans.h
> +++ b/fs/xfs/xfs_trans.h
> @@ -228,7 +228,6 @@ int		xfs_trans_free_extent(struct xfs_trans *,
>  				      struct xfs_efd_log_item *, xfs_fsblock_t,
>  				      xfs_extlen_t, struct xfs_owner_info *);
>  int		xfs_trans_commit(struct xfs_trans *);
> -int		__xfs_trans_roll(struct xfs_trans **, struct xfs_inode *, int *);
>  int		xfs_trans_roll(struct xfs_trans **, struct xfs_inode *);
>  void		xfs_trans_cancel(xfs_trans_t *);
>  int		xfs_trans_ail_init(struct xfs_mount *);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-05 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 18:53 [PATCH] xfs: fold __xfs_trans_roll into xfs_trans_roll Christoph Hellwig
2017-04-05 21:48 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox