From patchwork Wed Dec 18 03:14:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 3367251 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C0A789F344 for ; Wed, 18 Dec 2013 03:13:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB025203E1 for ; Wed, 18 Dec 2013 03:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0BFD203DF for ; Wed, 18 Dec 2013 03:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752539Ab3LRDNm (ORCPT ); Tue, 17 Dec 2013 22:13:42 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:33879 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752472Ab3LRDNm (ORCPT ); Tue, 17 Dec 2013 22:13:42 -0500 X-IronPort-AV: E=Sophos;i="4.95,504,1384272000"; d="scan'208";a="9280183" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 18 Dec 2013 11:10:06 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id rBI3DZHp023444; Wed, 18 Dec 2013 11:13:35 +0800 Received: from adam-work.lan ([10.167.226.24]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013121811130710-528470 ; Wed, 18 Dec 2013 11:13:07 +0800 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] btrfs: Cleanup the unused btrfs_check_super_valid. Date: Wed, 18 Dec 2013 11:14:28 +0800 Message-Id: <1387336468-28785-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 1.8.5.1 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/18 11:13:07, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/18 11:13:07, Serialize complete at 2013/12/18 11:13:07 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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Since in David's commit 1104a8855, there is nothing really check the super block now, the btrfs_check_super_valid function can be removed if no one else needs the function. Signed-off-by: Qu Wenruo Cc: David Sterba --- fs/btrfs/disk-io.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8072cfa..3bda365 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -56,8 +56,6 @@ static struct extent_io_ops btree_extent_io_ops; static void end_workqueue_fn(struct btrfs_work *work); static void free_fs_root(struct btrfs_root *root); -static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info, - int read_only); static void btrfs_destroy_ordered_operations(struct btrfs_transaction *t, struct btrfs_root *root); static void btrfs_destroy_ordered_extents(struct btrfs_root *root); @@ -2354,13 +2352,6 @@ int open_ctree(struct super_block *sb, memcpy(fs_info->fsid, fs_info->super_copy->fsid, BTRFS_FSID_SIZE); - ret = btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY); - if (ret) { - printk(KERN_ERR "btrfs: superblock contains fatal errors\n"); - err = -EINVAL; - goto fail_alloc; - } - disk_super = fs_info->super_copy; if (!btrfs_super_root(disk_super)) goto fail_alloc; @@ -3705,15 +3696,6 @@ int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid) return btree_read_extent_buffer_pages(root, buf, 0, parent_transid); } -static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info, - int read_only) -{ - /* - * Placeholder for checks - */ - return 0; -} - static void btrfs_error_commit_super(struct btrfs_root *root) { mutex_lock(&root->fs_info->cleaner_mutex);