Re: [Qemu-devel] [PATCH] exec: Remove unnecessary RAM_FILE flag

2015-11-09 Thread Paolo Bonzini
On 06/11/2015 23:11, Eduardo Habkost wrote: > The only code that sets RAMBlock.fd is file_ram_alloc(), and the only > code that calls file_ram_alloc() sets the RAM_FILE flag. That means the > flag is always set when RAMBlock.fd >= 0, and the munmap() call at > reclaim_ramblock() is dead code that

[Qemu-devel] [PATCH] exec: Remove unnecessary RAM_FILE flag

2015-11-06 Thread Eduardo Habkost
The only code that sets RAMBlock.fd is file_ram_alloc(), and the only code that calls file_ram_alloc() sets the RAM_FILE flag. That means the flag is always set when RAMBlock.fd >= 0, and the munmap() call at reclaim_ramblock() is dead code that never runs. Signed-off-by: Eduardo Habkost --- exe