From 08255d534200ed4e39291332d35db82b4668091b Mon Sep 17 00:00:00 2001 From: Rakesh Pandit Date: Mon, 24 Mar 2014 11:04:47 +0200 Subject: 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 Signed-off-by: David Sterba --- cmds-send.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'cmds-send.c') 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: -- cgit v1.2.3