Hi,
We recently jumped one of our products up to Linux 4.9, and found some minor incompatibilities with YAFFS (head). I've attached a patch to fix it, it isn't super controversial I don't think, although I didn't spend much time working out which kernel version the changes should really kick in at - I just assumed it was all for 4.9. Probably some of the changes should kick in for earlier versions.

Regards,
Andre