From patchwork Wed Dec 14 14:05:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 9474221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D67260571 for ; Wed, 14 Dec 2016 14:06:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 805FF28710 for ; Wed, 14 Dec 2016 14:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 751D128723; Wed, 14 Dec 2016 14:06:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFAC328710 for ; Wed, 14 Dec 2016 14:06:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755502AbcLNOF4 (ORCPT ); Wed, 14 Dec 2016 09:05:56 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44459 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755449AbcLNOFw (ORCPT ); Wed, 14 Dec 2016 09:05:52 -0500 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1cHABU-0002Jn-Kz; Wed, 14 Dec 2016 15:05:28 +0100 From: Sebastian Andrzej Siewior To: Chris Mason , Josef Bacik , David Sterba Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, Sebastian Andrzej Siewior Subject: [PATCH 1/2] btrfs: drop trace_btrfs_all_work_done() from normal_work_helper() Date: Wed, 14 Dec 2016 15:05:29 +0100 Message-Id: <20161214140530.6534-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For btrfs_scrubparity_helper() the ->func() is set to scrub_parity_bio_endio_worker(). This functions invokes scrub_free_parity() which kfrees() the `work' object. All is good as long as trace events are not enabled because we boom with a backtrace like this: | Workqueue: btrfs-endio btrfs_endio_helper | RIP: 0010:[] [] trace_event_raw_event_btrfs__work__done+0x4e/0xa0 | Call Trace: | [] btrfs_scrubparity_helper+0x59d/0x780 | [] btrfs_endio_helper+0x9/0x10 | [] process_one_work+0x26e/0x7b0 | [] worker_thread+0x46/0x560 | [] kthread+0xee/0x110 | [] ret_from_fork+0x2a/0x40 So in order to avoid this, I remove the trace point. Signed-off-by: Sebastian Andrzej Siewior --- fs/btrfs/async-thread.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index e0f071f6b5a7..d0dfc3d2e199 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -318,8 +318,6 @@ static void normal_work_helper(struct btrfs_work *work) set_bit(WORK_DONE_BIT, &work->flags); run_ordered_work(wq); } - if (!need_order) - trace_btrfs_all_work_done(work); } void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t uniq_func,