I looked into this and got really confused. We should never end up in generic_writepages if ->writepages is set, which this patch obviously does. Then I took a closer look at udf, and it seems to switch a_aops around at run time, and it seems like we're hitting just that case, and the patch just seems to narrow down that window. I suspect the right fix is to remove this runtime switching of aops, and just do conditionals inside the methods.