diff options
author | Rakesh Pandit <rakesh@tuxera.com> | 2014-03-24 11:04:47 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-04-22 14:33:35 +0200 |
commit | 08255d534200ed4e39291332d35db82b4668091b (patch) | |
tree | a1616bfb1afbddf78c9f6b99d59a13fe3e360937 /cmds-send.c | |
parent | a185d8541a4f9a7a23863277358229b45f091981 (diff) |
Btrfs-progs: remove unsed pthread attribute objects
Threads always use default attributes in all tools, so pthread
attribute objects and their initializations are of no use. Just pass
NULL as attr attribute to pthread_create for default attributes.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-send.c')
-rw-r--r-- | cmds-send.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/cmds-send.c b/cmds-send.c index dcb66076..1cd457db 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -240,7 +240,6 @@ static int do_send(struct btrfs_send *send, u64 parent_root_id, { int ret; pthread_t t_read; - pthread_attr_t t_attr; struct btrfs_ioctl_send_args io_send; void *t_err = NULL; int subvol_fd = -1; @@ -254,8 +253,6 @@ static int do_send(struct btrfs_send *send, u64 parent_root_id, goto out; } - ret = pthread_attr_init(&t_attr); - ret = pipe(pipefd); if (ret < 0) { ret = -errno; @@ -268,7 +265,7 @@ static int do_send(struct btrfs_send *send, u64 parent_root_id, send->send_fd = pipefd[0]; if (!ret) - ret = pthread_create(&t_read, &t_attr, dump_thread, + ret = pthread_create(&t_read, NULL, dump_thread, send); if (ret) { ret = -ret; @@ -317,8 +314,6 @@ static int do_send(struct btrfs_send *send, u64 parent_root_id, goto out; } - pthread_attr_destroy(&t_attr); - ret = 0; out: |