I am not able to find from where and when does
gets called. Also I noticed that when we open a file in O_TRUNC mode, this call goes through do_truncate() => notify_status() and then inode->i_ops->setattr(). Same way sys_truncate() somehow goes through same path. I am not able to understand when inode->i_ipo->truncate() gets called.
Please explain.
I have posted same query on kerneltrap too (no reply yet)