public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/5] btrfs: Remove delay_iput parameter from __start_delalloc_inodes
Date: Tue, 24 Apr 2018 15:26:09 +0200	[thread overview]
Message-ID: <20180424132609.GG21272@twin.jikos.cz> (raw)
In-Reply-To: <1524470057-21969-4-git-send-email-nborisov@suse.com>

On Mon, Apr 23, 2018 at 10:54:15AM +0300, Nikolay Borisov wrote:
> It's always set to 0 so remove it
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  fs/btrfs/inode.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 855237737acb..42a2590559df 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -10189,8 +10189,7 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode,
>   * some fairly slow code that needs optimization. This walks the list
>   * of all the inodes with pending delalloc and forces them to disk.
>   */
> -static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput,
> -				   int nr)
> +static int __start_delalloc_inodes(struct btrfs_root *root, int nr)

As the prototype and all callsites are changed, renaming the function
(dropping __ in this case) is an accepted change. Better than having
that as separate patch that just pollutes the git history.

>  {
>  	struct btrfs_inode *binode;
>  	struct inode *inode;
> @@ -10218,12 +10217,9 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput,
>  		}
>  		spin_unlock(&root->delalloc_lock);
>  
> -		work = btrfs_alloc_delalloc_work(inode, delay_iput);
> +		work = btrfs_alloc_delalloc_work(inode, 0);
>  		if (!work) {
> -			if (delay_iput)
> -				btrfs_add_delayed_iput(inode);
> -			else
> -				iput(inode);
> +			iput(inode);
>  			ret = -ENOMEM;
>  			goto out;
>  		}
> @@ -10262,7 +10258,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root)
>  	if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state))
>  		return -EROFS;
>  
> -	ret = __start_delalloc_inodes(root, 0, -1);
> +	ret = __start_delalloc_inodes(root, -1);
>  	if (ret > 0)
>  		ret = 0;
>  	return ret;
> @@ -10291,7 +10287,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr)
>  			       &fs_info->delalloc_roots);
>  		spin_unlock(&fs_info->delalloc_root_lock);
>  
> -		ret = __start_delalloc_inodes(root, 0, nr);
> +		ret = __start_delalloc_inodes(root, nr);
>  		btrfs_put_fs_root(root);
>  		if (ret < 0)
>  			goto out;
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-04-24 13:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  7:54 [PATCH 0/5] Remove delay_iput parameter when running delalloc work Nikolay Borisov
2018-04-23  7:54 ` [PATCH 1/5] btrfs: Remove delayed_iput parameter of btrfs_start_delalloc_roots Nikolay Borisov
2018-04-23  7:54 ` [PATCH 2/5] btrfs: Remove delayed_iput parameter from btrfs_start_delalloc_inodes Nikolay Borisov
2018-04-23  7:54 ` [PATCH 3/5] btrfs: Remove delay_iput parameter from __start_delalloc_inodes Nikolay Borisov
2018-04-24 13:26   ` David Sterba [this message]
2018-04-23  7:54 ` [PATCH 4/5] btrfs: Remove delayed_iput member from btrfs_delalloc_work Nikolay Borisov
2018-04-23  7:54 ` [PATCH 5/5] btrfs: Unexport btrfs_alloc_delalloc_work Nikolay Borisov
2018-04-24 13:22   ` David Sterba
2018-04-24 13:27     ` Nikolay Borisov
2018-04-24 14:23   ` [PATCH v2] " Nikolay Borisov
2018-04-24 14:24     ` David Sterba
2018-04-23  9:27 ` [PATCH 0/5] Remove delay_iput parameter when running delalloc work Qu Wenruo
2018-04-23  9:31   ` Nikolay Borisov
2018-04-24 13:29     ` David Sterba

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=20180424132609.GG21272@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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