Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp480909pxa; Thu, 27 Aug 2020 07:34:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBVoyqcPYs4am+yv9oBz0xlBPHKq6U4NdRxRrwNvrAosJL4SmECD5HHDH2dsvIrsv/Cj2s X-Received: by 2002:a17:906:924d:: with SMTP id c13mr20649361ejx.518.1598538852379; Thu, 27 Aug 2020 07:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598538852; cv=none; d=google.com; s=arc-20160816; b=gPX70ULjchXQNs1O+ZSMnopuAe186OSJ60InWp+OFp+sihfjF5nDaquWPTxzIw8ebz Aw+c8Udf0MCtXig/QV3WQru4js6XDc55xC+JP9qyjlN3LcSZ3qC3XreW/1owED4UWoqR RlWKMY/SCY7hYyOq2SkvlZaFZVUo2OPR1HuTjLxPorYnpQXY/28766tHl6F7UH/NlB9j ra9KJzit/W+TEMKRI7u67lT8OM0ZBDsYU+eUtFeRsqobWAkUCAbj0KgPXnJBg+ezeNrs 69/kksZw5g6+69YRFF1XN2+OQTNdEBD3/KnsaoAQnlkZpKm46GHruAYKgdlR4mAxIw9Z dWlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=f7Zg5UaWlZ+hUgE714od7fO2pMDc9gyR3y+yUXb6bP0=; b=XCxLvRrW6YddX2ZD6o286yPGbyY6Ft5qy0RMGfKes51TCxm1yn1SGeOIofSEowedhC nUvRmIRzfrXIknorxcMYhPbH0XjcPDUzCxFOPC4yiqSs7R7BglFhnJ8aINjk8dRpZOEt BCbX4OdQ+hMej7ViDiO8424e21iD8/qybqSFoiNxsZOY3Pm2QSTDC2hcoMk3yHd3qBmu fh1TAWuvHKtluRMdqR2g56lNAI5mS7nv/gnwMJbVD3BWyoeu3iHigGq71UxWyY+s2OrU NjnmTtklxstaiGEWFBI5ifMSRthrKU8rghpoZ/5iwrlPDBzHTRinJL+xOFV1MOq6gLVn nbSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si1493022ejf.666.2020.08.27.07.33.49; Thu, 27 Aug 2020 07:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbgH0OcJ (ORCPT + 99 others); Thu, 27 Aug 2020 10:32:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:45498 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbgH0O2I (ORCPT ); Thu, 27 Aug 2020 10:28:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 49B0AAC8B; Thu, 27 Aug 2020 14:28:03 +0000 (UTC) From: Takashi Iwai To: David Howells Cc: linux-cachefs@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH] fs/cachefiles: Drop superfluous readpages aops NULL check Date: Thu, 27 Aug 2020 16:27:24 +0200 Message-Id: <20200827142724.15032-1-tiwai@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the recent actions to convert readpages aops to readahead, the NULL checks of readpages aops in cachefiles_read_or_alloc_page() may hit falsely. More badly, it's an ASSERT() call, and this panics. Drop the superfluous NULL checks for fixing this regression. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208883 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1175245 Cc: # v5.8 Signed-off-by: Takashi Iwai --- fs/cachefiles/rdwr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 3080cda9e824..5b4cee71fa32 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -412,7 +412,6 @@ int cachefiles_read_or_alloc_page(struct fscache_retrieval *op, inode = d_backing_inode(object->backer); ASSERT(S_ISREG(inode->i_mode)); - ASSERT(inode->i_mapping->a_ops->readpages); /* calculate the shift required to use bmap */ shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits; @@ -712,7 +711,6 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op, inode = d_backing_inode(object->backer); ASSERT(S_ISREG(inode->i_mode)); - ASSERT(inode->i_mapping->a_ops->readpages); /* calculate the shift required to use bmap */ shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits; -- 2.16.4