From patchwork Thu Jan 26 01:06:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9538265 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 655B9604A8 for ; Thu, 26 Jan 2017 01:07:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5136627E33 for ; Thu, 26 Jan 2017 01:07:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4201A2807B; Thu, 26 Jan 2017 01:07:41 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 6528D27E33 for ; Thu, 26 Jan 2017 01:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752220AbdAZBHY (ORCPT ); Wed, 25 Jan 2017 20:07:24 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:34435 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbdAZBHW (ORCPT ); Wed, 25 Jan 2017 20:07:22 -0500 Received: by mail-pg0-f49.google.com with SMTP id 14so68688557pgg.1 for ; Wed, 25 Jan 2017 17:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=PkXFx/bj1COWX/ru3RjiGgN1m8OAWTQihForBfrs3g4=; b=QyW7ayKxlUgv7iC94A0VZuaTxRoOHvDgKzZ9RDIRXVBzI6IqTDWgOF1lnN4G9zK/Qn U3+2Bko69PUXWPnzTikBLmvFgBif+D2suu5MoRN7rOua52NnbcQwOJIfiPplGUCxFlCj 8N0ovzs8tqPQEJf8lsAHyGqqaoAz0wSDNwQ2Kgm4Xld5uXbXKNTA4qLq3BppTFMorsXy nz6qUlQGvamfWb1SUqB9ERcDs3zCLBeXH9ovME3qwki5/q+DzzGKinaYsjVz31jQ5UTS g71oj7azUW+q4JZbXNNOxvXc2nW9LahBdnAhwUDL9XGGN83pD7ejuevT8RKMIXWYoezu zeYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=PkXFx/bj1COWX/ru3RjiGgN1m8OAWTQihForBfrs3g4=; b=QgPOiSyatTTVuTy9d7Ox0ztHMGLrDOBSfH4K6XvzGTjAu2Xt4/1KIs6AvDjEJ6bidF c9lxRXfpYgoTrQkjFV3+l8aIJPq2ZAD57zUiofqTXd2xxdHO01BLzY9ljaQ7Nn6V/YRz e6wNkHxATi/vU58Outn0aAOH9VLVG7vzuAS7wGMDpjYv7me0qI1YuycNrerHjbFia8z8 f/I20I0Ftgn1wi/sXJn85ZKpDqfZm5pKqN4dPJ+36qTK57vty7cf1XREk3Uus9IS2aYr WaMpdz3cV9FKB/MfCDs4D6GU7u1+VKb+wXQveQmk+rAojaMwiT3aR5wHbTMqTp2bEACx b3+Q== X-Gm-Message-State: AIkVDXIgPTIwveqDmO8JlyJQDRYKHQgsjIavTOu2wZg62ONcrfM5wYLqrh2VCJgNfFDo43Nk X-Received: by 10.98.16.14 with SMTP id y14mr254118pfi.63.1485392841449; Wed, 25 Jan 2017 17:07:21 -0800 (PST) Received: from localhost.localdomain ([2601:602:8801:8110:e6a7:a0ff:fe0b:c9a8]) by smtp.gmail.com with ESMTPSA id w25sm146848pge.9.2017.01.25.17.07.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 17:07:20 -0800 (PST) From: Omar Sandoval To: linux-btrfs@vger.kernel.org Cc: Chris Murphy , Andreas Gruenbacher , stable@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v2 1/3] Btrfs: remove old tree_root case in btrfs_read_locked_inode() Date: Wed, 25 Jan 2017 17:06:38 -0800 Message-Id: <7796d3ba2cedf845e9d9e50667891ac31e48d551.1485392101.git.osandov@fb.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: 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 From: Omar Sandoval As Jeff explained in c2951f32d36c ("btrfs: remove old tree_root dirent processing in btrfs_real_readdir()"), supporting this old format is no longer necessary since the Btrfs magic number has been updated since we changed to the current format. There are other places where we still handle this old format, but since this is part of a fix that is going to stable, I'm only removing this one for now. Cc: # 4.9.x Signed-off-by: Omar Sandoval Reviewed-by: David Sterba --- fs/btrfs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 4e024260ad71..ae3989c22718 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3835,10 +3835,7 @@ static int btrfs_read_locked_inode(struct inode *inode) break; case S_IFDIR: inode->i_fop = &btrfs_dir_file_operations; - if (root == fs_info->tree_root) - inode->i_op = &btrfs_dir_ro_inode_operations; - else - inode->i_op = &btrfs_dir_inode_operations; + inode->i_op = &btrfs_dir_inode_operations; break; case S_IFLNK: inode->i_op = &btrfs_symlink_inode_operations;