• Alexander Viro's avatar
    [PATCH] sys_swapoff() cleanup · 76a79709
    Alexander Viro authored
    Instead of user_path_walk() and comparing dentries, sys_swapoff()
    opens its argument and compares ->i_mapping.  Result: slightly
    simpler code and swapoff(2) becomes tolerant to e.g.
    
    	swapon /dev/sda2
    	switch root from initrd to sda1
    	....
    	swapoff /dev/sda2  # where /dev is from sda1, not from initrd
    
    current tree fails in the case above (different dentries -> no love).
    76a79709
swapfile.c 37.3 KB