Loading
fs: ext2: Fix nbytes_to_read calculation in ext2_inode_read()
Fix incorrect nbytes_to_read calculation in ext2_inode_read() function. Previously nbytes_to_read was decremented by read value which caused incorrect calculation of bytes to read in subsequent iterations. Now nbytes_to_read is decremented by to_read value which represents the actual number of bytes read in current iteration. This fixes potential data corruption issues when reading files from ext2 filesystem. Signed-off-by:Chen Shu <751541594@qq.com> (cherry picked from commit 5a5f05ba)