From: Zheng Liu <wenqing.lz@xxxxxxxxxx> unwritten variable is assigned to the bytes of written data if writting to inline data is done. Otherwise, it will be assigned to 0. Signed-off-by: Zheng Liu <wenqing.lz@xxxxxxxxxx> --- lib/ext2fs/inline_data.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c index 7f5ec3e..fd89360 100644 --- a/lib/ext2fs/inline_data.c +++ b/lib/ext2fs/inline_data.c @@ -890,6 +890,11 @@ errcode_t ext2fs_try_to_write_inline_data(ext2_filsys fs, ext2_ino_t ino, retval = ext2fs_write_inode_full(fs, ino, (void *)inode, EXT2_INODE_SIZE(fs->super)); + if (!retval) + *written = nbytes; + else + *written = 0; + out: ext2fs_free_mem(&inode); return retval; -- 1.7.12.rc2.18.g61b472e -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html