From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8DD4F43ADD for ; Wed, 15 Nov 2023 20:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EFHy0vYr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FF90C32787; Wed, 15 Nov 2023 20:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700081841; bh=RZoFvYBIoi3oWaTSCAK7fu6Df5l4ULCoshICXAWtab0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EFHy0vYrDmiIXE4xvzurLJLZxqlEAcPBY9ZuIxN0V5tOkA0skp3RHEst0RqBIBu0W RKG/8rVzxa4aMZAgSSOGNMZjtk0t4bYPziWhbceH5FDqRRlJzo/vYEuBPbYTyv0gAR uf7HTxMWin5RGIOJN8/8HJfMjzXQ0rYaZeLoDLo4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.10 135/191] f2fs: fix to initialize map.m_pblk in f2fs_precache_extents() Date: Wed, 15 Nov 2023 15:46:50 -0500 Message-ID: <20231115204652.626544460@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115204644.490636297@linuxfoundation.org> References: <20231115204644.490636297@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chao Yu [ Upstream commit 8b07c1fb0f1ad139373c8253f2fad8bc43fab07d ] Otherwise, it may print random physical block address in tracepoint of f2fs_map_blocks() as below: f2fs_map_blocks: dev = (253,16), ino = 2297, file offset = 0, start blkaddr = 0xa356c421, len = 0x0, flags = 0 Fixes: c4020b2da4c9 ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6e91be5b8c30f..4e6b93f167589 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3315,6 +3315,7 @@ int f2fs_precache_extents(struct inode *inode) return -EOPNOTSUPP; map.m_lblk = 0; + map.m_pblk = 0; map.m_next_pgofs = NULL; map.m_next_extent = &m_next_extent; map.m_seg_type = NO_CHECK_TYPE; -- 2.42.0