···10471047 if (!max_to_defrag)10481048 max_to_defrag = last_index - 1;1049104910501050- while (i <= last_index && defrag_count < max_to_defrag) {10501050+ /*10511051+ * make writeback starts from i, so the defrag range can be10521052+ * written sequentially.10531053+ */10541054+ if (i < inode->i_mapping->writeback_index)10551055+ inode->i_mapping->writeback_index = i;10561056+10571057+ while (i <= last_index && defrag_count < max_to_defrag &&10581058+ (i < (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>10591059+ PAGE_CACHE_SHIFT)) {10511060 /*10521061 * make sure we stop running if someone unmounts10531062 * the FS