File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2002,6 +2002,18 @@ int ext4_convert_inline_data(struct inode *inode)
2002
2002
if (!ext4_has_inline_data (inode )) {
2003
2003
ext4_clear_inode_state (inode , EXT4_STATE_MAY_INLINE_DATA );
2004
2004
return 0 ;
2005
+ } else if (!ext4_test_inode_state (inode , EXT4_STATE_MAY_INLINE_DATA )) {
2006
+ /*
2007
+ * Inode has inline data but EXT4_STATE_MAY_INLINE_DATA is
2008
+ * cleared. This means we are in the middle of moving of
2009
+ * inline data to delay allocated block. Just force writeout
2010
+ * here to finish conversion.
2011
+ */
2012
+ error = filemap_flush (inode -> i_mapping );
2013
+ if (error )
2014
+ return error ;
2015
+ if (!ext4_has_inline_data (inode ))
2016
+ return 0 ;
2005
2017
}
2006
2018
2007
2019
needed_blocks = ext4_writepage_trans_blocks (inode );
You can’t perform that action at this time.
0 commit comments