This looks correct, but still has the second if ATTR_SIZE block thatoh, that would be much work for ocfs2 to do from my perspective. So I would really want to leave it as-is and I have add it to my to-do list.
I commented on last time. I'd really prefer if the filesystems could
move the truncate handling into a single conditional to simplify
auditing for it and possibly splitting it out into a separate method
later.
yeah, I can remove it.
And btw, the S_ISREG check which you only have on the first ATTR_SIZE
check is superflous, the VFS only does ATTR_SIZE calls on regular files.