Arachin 32 - Purchases in Walled Cities
Originally, the buyer of a home in a walled city would hide on the final day of the twelfth month after the purchase, in order that the seller could not redeem it, and the purchase was thus confirmed. Hillel enacted a law by which the original owner could deposit redemption money in a special room - and some say, with the court - and then break down the door of the house and enter.
All constructions similar to a house within a walled city can be likewise sold and redeemed within a year, but not fields - this is the opinion of the Sages. Rabbi Meir, based on the words of the Torah "which is in the city" includes even the fields for a one-year redemption. But it does say "house'! - You are right, and in fact Rabbi Meir includes only pebble fields, which are similar to a house, but not all fields.
Jerusalem belonged to all tribes, and therefore the law of walled cities did not apply to it, and houses there could always be redeemed. Other walled cities were re-sanctified by Ezra, and they kept this sanctity, because Jews never stopped living in Israel after Ezra.
Art: Charles Haigh-Wood - At the Cottage Door