gluster/glusterfs — pull request #15 by Supermathie (2013-04-30 15:55:14+00:00)
Title: nfs3-server: call truncate fop only if necessary

* nfs3svc_setattr_cbk: only truncate if requested size != current size

Existing code says:
/* Only truncate if the size is not already same as the requested truncation and also only if this is not a directory. */

But nothing actually implements the size check. This code adds that check to bypass the truncate call if unnecessary.