[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <99802996a3f4a0c2d89c79ec17be94e9c62ff8b6.1725334811.git.bo.wu@vivo.com>
Date: Tue, 3 Sep 2024 02:54:50 -0600
From: Wu Bo <bo.wu@...o.com>
To: linux-kernel@...r.kernel.org
Cc: Jaegeuk Kim <jaegeuk@...nel.org>,
Chao Yu <chao@...nel.org>,
linux-f2fs-devel@...ts.sourceforge.net,
Wu Bo <wubo.oduw@...il.com>,
Wu Bo <bo.wu@...o.com>
Subject: [PATCH 06/13] f2fs: fix address info has been truncated
If there is no data inline, the address table should not be truncate,
in case there may be reserved address info.
Signed-off-by: Wu Bo <bo.wu@...o.com>
---
fs/f2fs/inline.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 30b18053e784..a542956d618a 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -224,7 +224,8 @@ int f2fs_clear_inline_tail(struct inode *inode, bool force)
if (IS_ERR(ipage))
return PTR_ERR(ipage);
- f2fs_truncate_inline_inode(inode, ipage, 0);
+ if (f2fs_exist_data(inode))
+ f2fs_truncate_inline_inode(inode, ipage, 0);
clear_page_private_inline(ipage);
if (force || end_index >= COMPACT_ADDRS_PER_INODE)
--
2.35.3
Powered by blists - more mailing lists