From patchwork Fri Jul 10 04:10:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byongho Lee X-Patchwork-Id: 6761121 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 0BDF39F38C for ; Fri, 10 Jul 2015 04:12:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A13820793 for ; Fri, 10 Jul 2015 04:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 37A2C20791 for ; Fri, 10 Jul 2015 04:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751367AbbGJEKg (ORCPT ); Fri, 10 Jul 2015 00:10:36 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:32992 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbbGJEKf (ORCPT ); Fri, 10 Jul 2015 00:10:35 -0400 Received: by pdbqm3 with SMTP id qm3so33008634pdb.0 for ; Thu, 09 Jul 2015 21:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=HFz6PYpYVMf2458s5iQ780A2MaVGLyM3RdHuwXCAuCQ=; b=IVGMaUUTDhMBctIUELjGeamteBUCOstxgp9AuhPxga1RBb1F4O2QUIzpGklBjeyLE2 sIoBrjHsch8x5qxs2vpcYWw7lbOrLqUmGqSvmTZSYM7Xl7qNSpjhXN5hx/uk7yaHXAN2 5aieyc3An6TLp0IryvBkYijKGPcmSa/JBY0MfCP1tQuvHjoFlOISa49QdRJtR9Gfk3Rd Z8No39oGlcm4dE7+8l/a72nevzTCfF2t0r1xMtMH9jw5sByXhUDmzPef/iBA3ahI092V WWNY6CTQ3Il3bKzSAluViPchXd1EEx/4DUHl+wFx/6pqLpdDsXtWMdfv5s6VkaSsyTgQ Ggjw== X-Received: by 10.67.1.72 with SMTP id be8mr26516816pad.47.1436501434710; Thu, 09 Jul 2015 21:10:34 -0700 (PDT) Received: from arch-nb.localdomain ([211.106.186.1]) by smtp.gmail.com with ESMTPSA id sx5sm7745227pab.4.2015.07.09.21.10.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 21:10:33 -0700 (PDT) From: Byongho Lee To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: remove unused mutex from struct 'btrfs_fs_info' Date: Fri, 10 Jul 2015 13:10:26 +0900 Message-Id: <1436501426-29202-1-git-send-email-bhlee.kernel@gmail.com> X-Mailer: git-send-email 2.4.5 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The code using 'ordered_extent_flush_mutex' mutex has removed by below commit. - 8d875f95da43c6a8f18f77869f2ef26e9594fecc btrfs: disable strict file flushes for renames and truncates But the mutex still lives in struct 'btrfs_fs_info'. So, this patch removes the mutex from struct 'btrfs_fs_info' and its initialization code. Signed-off-by: Byongho Lee Reviewed-by: David Sterba --- fs/btrfs/ctree.h | 6 ------ fs/btrfs/disk-io.c | 1 - 2 files changed, 7 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index aac314e14188..cdde6d541b3a 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1518,12 +1518,6 @@ struct btrfs_fs_info { */ struct mutex ordered_operations_mutex; - /* - * Same as ordered_operations_mutex except this is for ordered extents - * and not the operations. - */ - struct mutex ordered_extent_flush_mutex; - struct rw_semaphore commit_root_sem; struct rw_semaphore cleanup_work_sem; diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index e5aad7f535aa..6ba584714c51 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2608,7 +2608,6 @@ int open_ctree(struct super_block *sb, mutex_init(&fs_info->ordered_operations_mutex); - mutex_init(&fs_info->ordered_extent_flush_mutex); mutex_init(&fs_info->tree_log_mutex); mutex_init(&fs_info->chunk_mutex); mutex_init(&fs_info->transaction_kthread_mutex);