files-reg: Refactor create_ghost()
In the most cases, file descriptor is not need in this function. It's need in the case of creating a regular file only. So we can use chown() instead of fchown(), and operate with a path directly. The patch moves copying content of a regular file to new function mkreg_ghost(). This will be used in next patches. Also, parameter gf will be used. Signed-off-by:Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment