From patchwork Sun Jan 4 00:59:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5562531 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 281E69F344 for ; Sun, 4 Jan 2015 00:57:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D21B20158 for ; Sun, 4 Jan 2015 00:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EA8920165 for ; Sun, 4 Jan 2015 00:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752213AbbADA47 (ORCPT ); Sat, 3 Jan 2015 19:56:59 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:42211 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbbADA46 (ORCPT ); Sat, 3 Jan 2015 19:56:58 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so6084302wes.20 for ; Sat, 03 Jan 2015 16:56:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z+Lu7ZRwu0icQJ7sI2cZlf685tbg0AZkUkj7OJOJwGY=; b=S2R5KYdQ2mVtYKAGgSN8rV4JykDvfyaDqlZT8N+1ULDd2IjCoQ3iEM0dAlKYLMSnnv 7vvF/bK+hYbntU7kmOjRxr/MjDS584de++p9pk0/uWwnsFRUN9uNIUdFI5GNcgpAQfgd 9g8Pl4jCGkwBjNLk4lKWnEHUD4ZJzb/1lp5jsfYTqqL+kVyTzQfY31BCSrmU5Uwgg0MD FtVCk28oJqGoSwVQaaJ+FBz0XWqWlq5bxah3ETDdL6M9WDXG/IBgTqSh4pemEI3WQhtg tsGdYgscTEN2HHIgNk6mmVFcZ7zItzDEEF0F9xjnvKZZsVB9Lx8Bd6pG+tgYm/Oeejvh JuIQ== X-Gm-Message-State: ALoCoQmZta19b3Fnc5852ih2/pq473DYfKjK+fRpD8EVVP0/szJTOzr+hrR9a45B/EwSyQUBaoYj X-Received: by 10.194.110.69 with SMTP id hy5mr167255984wjb.121.1420333016520; Sat, 03 Jan 2015 16:56:56 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id qg11sm4259555wic.17.2015.01.03.16.56.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Jan 2015 16:56:55 -0800 (PST) From: Rickard Strandqvist To: Chris Mason , Josef Bacik Cc: Rickard Strandqvist , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: reada: Remove unused function Date: Sun, 4 Jan 2015 01:59:57 +0100 Message-Id: <1420333197-6245-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the function btrfs_reada_detach() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- fs/btrfs/ctree.h | 1 - fs/btrfs/reada.c | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index fe69edd..030a7b5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -4111,7 +4111,6 @@ struct reada_control { struct reada_control *btrfs_reada_add(struct btrfs_root *root, struct btrfs_key *start, struct btrfs_key *end); int btrfs_reada_wait(void *handle); -void btrfs_reada_detach(void *handle); int btree_readahead_hook(struct btrfs_root *root, struct extent_buffer *eb, u64 start, int err); diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index b63ae20..97073c0c 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c @@ -37,7 +37,7 @@ * To trigger a readahead, btrfs_reada_add must be called. It will start * a read ahead for the given range [start, end) on tree root. The returned * handle can either be used to wait on the readahead to finish - * (btrfs_reada_wait), or to send it to the background (btrfs_reada_detach). + * (btrfs_reada_wait). * * The read ahead works as follows: * On btrfs_reada_add, the root of the tree is inserted into a radix_tree. @@ -986,10 +986,3 @@ int btrfs_reada_wait(void *handle) return 0; } #endif - -void btrfs_reada_detach(void *handle) -{ - struct reada_control *rc = handle; - - kref_put(&rc->refcnt, reada_control_release); -}