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>
This commit is contained in:
Rakesh Pandit 2014-04-19 02:14:14 +03:00 committed by David Sterba
parent 275fd93826
commit 6ca8f9cfc2
1 changed files with 3 additions and 10 deletions

View File

@ -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;