From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:37184 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbfHNLPj (ORCPT ); Wed, 14 Aug 2019 07:15:39 -0400 Date: Wed, 14 Aug 2019 13:15:35 +0200 From: Christoph Hellwig Subject: Re: [PATCH 2/9] cachefiles: drop direct usage of ->bmap method. Message-ID: <20190814111535.GC1885@lst.de> References: <20190808082744.31405-1-cmaiolino@redhat.com> <20190808082744.31405-3-cmaiolino@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808082744.31405-3-cmaiolino@redhat.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org, hch@lst.de, adilger@dilger.ca, jaegeuk@kernel.org, darrick.wong@oracle.com, miklos@szeredi.hu, rpeterso@redhat.com, linux-xfs@vger.kernel.org On Thu, Aug 08, 2019 at 10:27:37AM +0200, Carlos Maiolino wrote: > + block = page->index; > + block <<= shift; Can't this cause overflows? > + > + ret = bmap(inode, &block); > + ASSERT(!ret); I think we want some real error handling here instead of just an assert..