mm/page-writeback.c: write_cache_pages(): deduplicate identical checks
[linux-2.6-microblaze.git] / mm / page-writeback.c
index 2caf780..ab5a3ce 100644 (file)
@@ -2182,12 +2182,12 @@ int write_cache_pages(struct address_space *mapping,
                if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
                        range_whole = 1;
        }
-       if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
+       if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages) {
+               tag_pages_for_writeback(mapping, index, end);
                tag = PAGECACHE_TAG_TOWRITE;
-       else
+       } else {
                tag = PAGECACHE_TAG_DIRTY;
-       if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
-               tag_pages_for_writeback(mapping, index, end);
+       }
        done_index = index;
        while (!done && (index <= end)) {
                int i;