We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72f63f4 commit ef09ed5Copy full SHA for ef09ed5
fs/ext4/inline.c
@@ -2005,6 +2005,18 @@ int ext4_convert_inline_data(struct inode *inode)
2005
if (!ext4_has_inline_data(inode)) {
2006
ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA);
2007
return 0;
2008
+ } else if (!ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
2009
+ /*
2010
+ * Inode has inline data but EXT4_STATE_MAY_INLINE_DATA is
2011
+ * cleared. This means we are in the middle of moving of
2012
+ * inline data to delay allocated block. Just force writeout
2013
+ * here to finish conversion.
2014
+ */
2015
+ error = filemap_flush(inode->i_mapping);
2016
+ if (error)
2017
+ return error;
2018
+ if (!ext4_has_inline_data(inode))
2019
+ return 0;
2020
}
2021
2022
needed_blocks = ext4_writepage_trans_blocks(inode);
0 commit comments