[SCSI] sd_dif: problem with verify of type 1 protection information (PI)
[cascardo/linux.git] / mm / page-writeback.c
index cdc377c..4514ad7 100644 (file)
@@ -696,7 +696,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
         *     => fast response on large errors; small oscillation near setpoint
         */
        setpoint = (freerun + limit) / 2;
-       x = div_s64((setpoint - dirty) << RATELIMIT_CALC_SHIFT,
+       x = div_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT,
                    limit - setpoint + 1);
        pos_ratio = x;
        pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
@@ -1986,6 +1986,8 @@ int __set_page_dirty_no_writeback(struct page *page)
  */
 void account_page_dirtied(struct page *page, struct address_space *mapping)
 {
+       trace_writeback_dirty_page(page, mapping);
+
        if (mapping_cap_account_dirty(mapping)) {
                __inc_zone_page_state(page, NR_FILE_DIRTY);
                __inc_zone_page_state(page, NR_DIRTIED);
@@ -2309,10 +2311,6 @@ void wait_for_stable_page(struct page *page)
 
        if (!bdi_cap_stable_pages_required(bdi))
                return;
-#ifdef CONFIG_NEED_BOUNCE_POOL
-       if (mapping->host->i_sb->s_flags & MS_SNAP_STABLE)
-               return;
-#endif /* CONFIG_NEED_BOUNCE_POOL */
 
        wait_on_page_writeback(page);
 }