Willow Financial Bancorp Inc. said today that it wrote off $40 million of the $93.7 million in goodwill it recorded when it bought Chester Valley Bancorp Inc. for $145.3 million in 2005.

The disclosure came in the Wayne bank's delayed quarterly financial report with the Securities and Exchange Commission for the three months ended Dec. 31.

Harleysville National Corp. said yesterday that it would buy Willow Financial for $162 million in an all-stock deal.

The purchase of Chester Valley brought with it accounting woes that led to a separate $8.3 million write-down this month.

Goodwill comes from the premium paid for a company above the value of its assets.