Skip to contentSkip to conversation

f2fs: skip if inline_data was converted already

PATCH New Jaegeuk Kim 1 participant 1 message Aug 19, 2014

Subsystems (2)
lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: skip if inline_data was converted already

This patch checks inline_data one more time under the inode page lock whether its inline_data is converted or not.

---
 fs/f2fs/inline.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/f2fs/inline.c +5 -1
index 4d1f39f..3e8ecdf 100644
@@ -68,7 +68,7 @@ out:
 
 static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
 {
-	int err;
+	int err = 0;
 	struct page *ipage;
 	struct dnode_of_data dn;
 	void *src_addr, *dst_addr;
@@ -86,6 +86,10 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
 		goto out;
 	}
 
+	/* someone else converted inline_data already */
+	if (!f2fs_has_inline_data(inode))
+		goto out;
+
 	/*
 	 * i_addr[0] is not used for inline data,
 	 * so reserving new block will not destroy inline data
Signature · 4 lines
1.8.5.2 (Apple Git-48)


------------------------------------------------------------------------------