linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rakesh Pandit <rakesh@tuxera.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH 2/2] Btrfs-progs: receive: remove return type of close_inode_for_write
Date: Sat, 19 Apr 2014 02:14:14 +0300	[thread overview]
Message-ID: <20140418231413.GA1885@hercules.tuxera.com> (raw)

"close_inode_for_write" always returns 0, so just remove its return
value and remove dead checking in caller.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
 cmds-receive.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/cmds-receive.c b/cmds-receive.c
index 7a23823..39309f2 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -612,19 +612,14 @@ out:
 	return ret;
 }
 
-static int close_inode_for_write(struct btrfs_receive *r)
+static void close_inode_for_write(struct btrfs_receive *r)
 {
-	int ret = 0;
-
 	if(r->write_fd == -1)
-		goto out;
+		return;
 
 	close(r->write_fd);
 	r->write_fd = -1;
 	r->write_path[0] = 0;
-
-out:
-	return ret;
 }
 
 static int process_write(const char *path, const void *data, u64 offset,
@@ -1017,9 +1012,7 @@ static int do_receive(struct btrfs_receive *r, const char *tomnt, int r_fd)
 		if (ret)
 			end = 1;
 
-		ret = close_inode_for_write(r);
-		if (ret < 0)
-			goto out;
+		close_inode_for_write(r);
 		ret = finish_subvol(r);
 		if (ret < 0)
 			goto out;
-- 
1.8.5.3


                 reply	other threads:[~2014-04-18 23:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140418231413.GA1885@hercules.tuxera.com \
    --to=rakesh@tuxera.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).