Gather all ingredients. Preheat the oven to 350 degrees F (175 degrees C). Grease and flour two 9-inch cake pans.
To make the cake: Sift flour, sugar, baking soda, and salt together in a large bowl. Combine bananas, oil, walnuts, pineapple, and eggs in another large bowl; mix well.
Stir flour mixture into banana mixture until combined. Pour batter into the prepared pans.
Bake in the preheated oven until a toothpick inserted into the center of each pan comes out clean, about 1 hour. Allow cakes to cool on wire racks.
Meanwhile, make frosting: Beat together confectioners' sugar, cream cheese, butter, and vanilla in a medium bowl until smooth.
Evenly spread frosting on the middle, sides, and top of cooled cake.
