From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9505B3164A9 for ; Wed, 26 Nov 2025 06:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764139285; cv=none; b=SVd0jvIapXwycPN+6As4zNQr0R7Qq5y50YXmIWGK7jkxCkb6aZYebo4wZF5lUk6fFX8zIPLG7HDJgq8TeCK3qxw3ggPsKGfgl4dKNM3WIdOIGDw7XniOBPf3s9PvTut6H1AteTqeYrsShXUSqjzngmNimb/dJfXvYai19nGLS54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764139285; c=relaxed/simple; bh=1TKdcl+DPamLTPthHZhqVNjy//EZUZOr+dRJbdpNndE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CwuzkS0ap+IzDHK/Z423DzUKmbi41BEGxDRPHbIvSFQiPaO8cSMoA86Tfg77QFPhdy0AXr+g2EDziU+9nSnekn0liX/PjoCQdpIpfOF/79obufvDpdad53Do3v0FvY/3vSkK/VQajFuSZjOgs+qpCRf9QOZJXCnd7498KwmRX+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=x4d7s5+e; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="x4d7s5+e" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MoIpT92AR0jYhRT/he4nwYsbYANRrOzAz0xRMUECV50=; b=x4d7s5+e7z2Cs4Qly6l0S+LVQZ UOwJ134Qob6aIW1h88N7ivRwC+SfLGFP24EbVOtLwr9evwnM41+N48pHdKB07TKKwSeTNl48eHp7r xeFRpmKuer02A2waepad6RTqWEU8FXMmAO8J48EaYTQ/29TgwJgSV0Ibuda5AtP0Rn5Lf0wFI0jcW 4j/WkeBqG91v5CxJQxWSeCd0L/s/P9YNTcZdtyHEhIO01AHcecDgvR4bG4MBXipDEyj+jKy/u45Tp eSW0YJLhqieRGeb2d6ZTK2omgpHQ/FEyl8KhDoC6rJSwn/pghdGphNs7z/2q4BItv4Pod9J15OJwl 87zRildA==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vO9DO-0000000ES8y-0GG5; Wed, 26 Nov 2025 06:41:22 +0000 Date: Tue, 25 Nov 2025 22:41:22 -0800 From: Christoph Hellwig To: Chao Yu Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, stable@kernel.org Subject: Re: [PATCH] f2fs: fix to check bio after __blkdev_issue_discard() Message-ID: References: <20251126061437.658896-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251126061437.658896-1-chao@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Nov 26, 2025 at 02:14:37PM +0800, Chao Yu wrote: > Previously, __blkdev_issue_discard() will always returned valid bio, > after commit e8b4869bc78d ("block: add a blk_alloc_discard_bio helper"), > it can return bio w/ NULL value, which may trigger panic or warning > in __submit_discard_cmd(), let's fix to check bio instread of return > value after __blkdev_issue_discard(). It can only return blk_alloc_discard_bio if the the gfp_mask doesn't allow sleeping (which isn't the case here), or nr_sect is zero, which I hope is also not the case as __submit_discard_cmd would run into various other problems. So no, I don't think this is patch makes any sense.