From: Nikolay Borisov <nborisov@suse.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs: drop devices declare in btrfs_init_new_device()
Date: Tue, 3 Jul 2018 08:58:16 +0300 [thread overview]
Message-ID: <92f4200f-10fb-971f-e369-26f8a837f82d@suse.com> (raw)
In-Reply-To: <20180703051451.3673-2-anand.jain@oracle.com>
On 3.07.2018 08:14, Anand Jain wrote:
> There is only one usage of the declared devices variable, instead
> use its value directly.
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/volumes.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index f7fa0ea26e9c..124bd8728c37 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -2406,7 +2406,6 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
> struct btrfs_trans_handle *trans;
> struct btrfs_device *device;
> struct block_device *bdev;
> - struct list_head *devices;
> struct super_block *sb = fs_info->sb;
> struct rcu_string *name;
> struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
> @@ -2431,10 +2430,8 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
>
> filemap_write_and_wait(bdev->bd_inode->i_mapping);
>
> - devices = &fs_devices->devices;
> -
> mutex_lock(&fs_devices->device_list_mutex);
> - list_for_each_entry(device, devices, dev_list) {
> + list_for_each_entry(device, &fs_devices->devices, dev_list) {
> if (device->bdev == bdev) {
> ret = -EEXIST;
> mutex_unlock(
>
next prev parent reply other threads:[~2018-07-03 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 5:14 [PATCH 1/2] btrfs: declare fs_devices in btrfs_init_new_device() Anand Jain
2018-07-03 5:14 ` [PATCH 2/2] btrfs: drop devices declare " Anand Jain
2018-07-03 5:58 ` Nikolay Borisov [this message]
2018-07-04 14:57 ` [PATCH 1/2] btrfs: declare fs_devices " 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=92f4200f-10fb-971f-e369-26f8a837f82d@suse.com \
--to=nborisov@suse.com \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.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).