Nikita Pettik
authored
xdir_say_gc() takes errno and return code of unlink() sys call. If RC is negative (meaning that unlink failed) we reset errno to given value and log corresponding error message (it is done this way since eio saves errno to internal structure so we have to restore it manually). Before this patch, unlink() call was "in-place" of argument. However, the order of argument evaluation is unspecified. So it may turn out that we assign errno to the previous value, which is obviously wrong. To fix it let's firstly invoke unlink() and then pass the result of call to xdir_say_gc().
Name | Last commit | Last update |
---|