diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 20f1d63266ad..d09e2bbec3e7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -703,6 +703,14 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr) * larger than i_size. */ truncate_setsize(inode, attr->ia_size); + + /* should convert inline inode here */ + if (f2fs_has_inline_data(inode) && + !f2fs_may_inline_data(inode)) { + err = f2fs_convert_inline_inode(inode); + if (err) + return err; + } inode->i_mtime = inode->i_ctime = CURRENT_TIME; } }