That looks like a missing piece that would have saved us a lot of headache. At the time we were on linux 4.4 and 4.8. Thanks for sharing that.
Without deep diving through the impl, I wonder if that flag would also protect against network buffer allocations in the kernel caused by network reads/write in the userland process marked with that flag from entering the IO flush paths as well. Because we are making network calls in our userland block device driver to cloud storage, the socket buffers in the kernel can also sometimes need to allocate additional buffer space and it was one avenue we saw also trigger the IO flushing of dirty FS pages and re-enter the FS kernel driver and block device drivers causing deadlock.
Kernel fs driver -> kernel block device driver -> userland block device driver impl (makes network read/write calls) -> kernel network drivers (decides to allocate additional socket buffer memory but triggers reclaiming pages) -> kernel fs driver (wedges because locks already held)