Received: by 10.223.185.116 with SMTP id b49csp4150701wrg; Mon, 19 Feb 2018 12:05:06 -0800 (PST) X-Google-Smtp-Source: AH8x227gdLJmoIppGyPayU4IrSksADtgwmW6DTAwuloyfic0MiZV34IRvSCR6Diq+Ww6l2tZzDAg X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr15512922pld.365.1519070706834; Mon, 19 Feb 2018 12:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519070706; cv=none; d=google.com; s=arc-20160816; b=k8LpmQBevFrts7YesYICuTKyC4G3MYpYrom2vJoesGrXmVsvE2pP05VG4nlSohTg/e jYk5fg2R3fjwd8+rqlrSs856eZAJ/+ccrECtmxkfR+RMHeKh53c6nxzTH507bZRXbK3I dijUMTQeIrMwepIc9hpx96X64ruDNq4HKWw59O0b0M+b8dWL5NNbbsxKe422dR2sEnnS SIfvwodWeAA774I/KzIHVCgECdyw5o0dHL8i6B3UwGjNyss3ztmPC1J5w8SUUfJ3bqcw u+6bpzb9p/M9TSxehZKNaD4r7CwOya3qLSh996WlQdFD1g2EgAFktnc+hi4Tvfy7Exjh cxkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=xFST2JVq8jIysvcr/indaqWsaLLTh3+2S43ErXuh55g=; b=ltXFi7Fr1LqQ0VwWvmVF3aJF8nii0K87rBSwUeWCla+XXQUW751iyu9W5iOIZ3MzkW hDB8dWtNqNtSuRiU7GM+dQvqD5EhiTBpDJ1ujXstDdE1HUJAKyqpWLY93mO1KxV2aBW4 ZOE/X32Zt98LGAIc/glvxm4kmRsYFg81CYCJluZkJ0TgdFQYvmYHMGUipYM/ysjrCvHU fqF4KKDubhzO2BOxcELtei60yb7rxpz4SWh3u46IytT+49cy+3bEyQUjzN1xksF8+1bP D+BEcSb5BiYso5wVJvbA9NRpRJtZw12KndbkEuFKIrYT08alid2JnfdfOeWANNeLe9cB a8oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=kAceA0mO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33-v6si8138817pli.455.2018.02.19.12.04.52; Mon, 19 Feb 2018 12:05:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=kAceA0mO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932115AbeBSUEQ (ORCPT + 99 others); Mon, 19 Feb 2018 15:04:16 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:44546 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753619AbeBSTqH (ORCPT ); Mon, 19 Feb 2018 14:46:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xFST2JVq8jIysvcr/indaqWsaLLTh3+2S43ErXuh55g=; b=kAceA0mOrBaTl+sQ2ZBg/WtU6 805wE3qpUYOXv9ClhJkndzTPwPethcEsSxMK0M2Y5Ao1/JIGTMCiAdG7nBfRdPbjNYPhc7BcXmv5u 7RKl5KaYPUlNm37tjmYnKCadCM6Q3ASsoYi8aHgayaVG8FXijqeB6PhQWRjzv8iFMBZPgAeszo+y0 5/UJ+4yqRtvmcGhYC48zwxmfwilHfgDUwdDVqS/YYWSsHJxBuPKy+Hz7/8RcACXSH4FPzJNSFz4ZL vcBrtapwCEbuAM2cMfLd+xQjgDYntjMfgXJgav9r2JUxSJNuyjqBWmCx6vkttJsjR0yqcQgNnUofm MWPx0DNiw==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1enrO1-0001kQ-R6; Mon, 19 Feb 2018 19:46:05 +0000 From: Matthew Wilcox To: Andrew Morton Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v7 07/61] fscache: Use appropriate radix tree accessors Date: Mon, 19 Feb 2018 11:45:02 -0800 Message-Id: <20180219194556.6575-8-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180219194556.6575-1-willy@infradead.org> References: <20180219194556.6575-1-willy@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox Don't open-code accesses to data structure internals. Signed-off-by: Matthew Wilcox --- fs/fscache/cookie.c | 2 +- fs/fscache/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index ff84258132bb..e9054e0c1a49 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c @@ -608,7 +608,7 @@ void __fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire) /* Clear pointers back to the netfs */ cookie->netfs_data = NULL; cookie->def = NULL; - BUG_ON(cookie->stores.rnode); + BUG_ON(!radix_tree_empty(&cookie->stores)); if (cookie->parent) { ASSERTCMP(atomic_read(&cookie->parent->usage), >, 0); diff --git a/fs/fscache/object.c b/fs/fscache/object.c index 7a182c87f378..aa0e71f02c33 100644 --- a/fs/fscache/object.c +++ b/fs/fscache/object.c @@ -956,7 +956,7 @@ static const struct fscache_state *_fscache_invalidate_object(struct fscache_obj * retire the object instead. */ if (!fscache_use_cookie(object)) { - ASSERT(object->cookie->stores.rnode == NULL); + ASSERT(radix_tree_empty(&object->cookie->stores)); set_bit(FSCACHE_OBJECT_RETIRED, &object->flags); _leave(" [no cookie]"); return transit_to(KILL_OBJECT); -- 2.16.1