after the spouse , (3) by inserting , child, parent, or grandparent after spouse in the heading thereof, and (4) by adding at the end the following: In the case of a child who acquires such beneficiary’s interest and with respect to whom a deduction under section 151 is allowable to another taxpayer for a taxable year beginning in the calendar year in which such individual’s taxable year begins, such health savings account shall be treated as a health savings account of such child. . (b) Effective date The amendments made by this section shall apply to taxable years beginning after the date of the enactment of this Act. 9. Equivalent bankruptcy protections for health savings accounts as retirement funds (a) In general Section 522 of title 11, United States Code, is amended by adding at the end the following new subsection: (r) Treatment of health savings accounts For purposes of this section, any health savings account (as described in section 223 of the Internal Revenue Code of 1986) shall be treated in the same manner as an individual retirement account described in section 408 of such Code. . (b) Effective date The amendment made by this section shall apply to cases commencing under title 11, United States Code, after the date of the enactment of this Act.