All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Marek Behun <marek.behun@nic.cz>
Cc: Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, u-boot@lists.denx.de,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [PATCH 1/1] fs: btrfs: simplify close_ctree_fs_info()
Date: Fri, 25 Dec 2020 13:45:25 +0100	[thread overview]
Message-ID: <20201225124525.17707-1-xypron.glpk@gmx.de> (raw)

At the beginning of close_ctree_fs_info() the value 0 is assigned to err
and never changed before testing it.

Let's get rid of the superfluous variable.

Fixes: f06bfcf54d0e ("fs: btrfs: Crossport open_ctree_fs_info() from btrfs-progs")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 fs/btrfs/disk-io.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 01e7cee520..b332ecb796 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1030,7 +1030,6 @@ out:
 int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
 {
 	int ret;
-	int err = 0;

 	free_fs_roots_tree(&fs_info->fs_root_tree);

@@ -1038,9 +1037,7 @@ int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
 	ret = btrfs_close_devices(fs_info->fs_devices);
 	btrfs_cleanup_all_caches(fs_info);
 	btrfs_free_fs_info(fs_info);
-	if (!err)
-		err = ret;
-	return err;
+	return ret;
 }

 int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid)
--
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] fs: btrfs: simplify close_ctree_fs_info()
Date: Fri, 25 Dec 2020 13:45:25 +0100	[thread overview]
Message-ID: <20201225124525.17707-1-xypron.glpk@gmx.de> (raw)

At the beginning of close_ctree_fs_info() the value 0 is assigned to err
and never changed before testing it.

Let's get rid of the superfluous variable.

Fixes: f06bfcf54d0e ("fs: btrfs: Crossport open_ctree_fs_info() from btrfs-progs")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 fs/btrfs/disk-io.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 01e7cee520..b332ecb796 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1030,7 +1030,6 @@ out:
 int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
 {
 	int ret;
-	int err = 0;

 	free_fs_roots_tree(&fs_info->fs_root_tree);

@@ -1038,9 +1037,7 @@ int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
 	ret = btrfs_close_devices(fs_info->fs_devices);
 	btrfs_cleanup_all_caches(fs_info);
 	btrfs_free_fs_info(fs_info);
-	if (!err)
-		err = ret;
-	return err;
+	return ret;
 }

 int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid)
--
2.29.2

             reply	other threads:[~2020-12-25 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-25 12:45 Heinrich Schuchardt [this message]
2020-12-25 12:45 ` [PATCH 1/1] fs: btrfs: simplify close_ctree_fs_info() Heinrich Schuchardt
2020-12-25 13:08 ` Qu Wenruo
2020-12-25 13:08   ` Qu Wenruo
2021-01-20 21:46 ` Tom Rini
2021-01-20 21:46   ` Tom Rini

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=20201225124525.17707-1-xypron.glpk@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=u-boot@lists.denx.de \
    --cc=wqu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.