aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-receive.c
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2014-04-19 02:14:14 +0300
committerDavid Sterba <dsterba@suse.cz>2014-05-02 17:03:39 +0200
commit6ca8f9cfc28364cf7378b54df41008bc52478f2e (patch)
tree86c22543e7a79893fde5c0a4b77f5fb2285bf951 /cmds-receive.c
parent275fd93826bdd1f20e34f2a0fe6d8a3f03767908 (diff)
downloadbtrfs-progs-6ca8f9cfc28364cf7378b54df41008bc52478f2e.tar.gz
btrfs-progs-6ca8f9cfc28364cf7378b54df41008bc52478f2e.tar.xz
btrfs-progs-6ca8f9cfc28364cf7378b54df41008bc52478f2e.zip
Btrfs-progs: receive: remove return type of close_inode_for_write
"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> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-receive.c')
-rw-r--r--cmds-receive.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/cmds-receive.c b/cmds-receive.c
index d6cd3da..8d85ca9 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -523,19 +523,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,
@@ -879,9 +874,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;