You didn't actually explain the _reason_ for making this change. Please always do that.

The patch is... surprisingly complicated, although the end resultlooks OK. This is not aided by the partial duplication betweenmapping_tagged(PAGECACHE_TAG_DIRTY) and I_DIRTY_PAGES. I don't thinkwe can easily remove I_DIRTY_PAGES because it's used for thedid-someone-just-dirty-a-page test here.

This code is way too complex and fragile and I fear that anything we doto it will break something :(