[CRIU] Re: [PATCH v2 01/11] dump: remove fd check for dir
Pavel Emelyanov
xemul at parallels.com
Mon Mar 5 10:34:41 EST 2012
On 03/05/2012 04:38 PM, Kinsbursky Stanislav wrote:
> This stats check of "/proc/*/fd/*" path for directory look redundant. It can't
> be such.
Why can it be a regular file, character device but cannot be a directory?
> Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
>
> ---
> cr-dump.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/cr-dump.c b/cr-dump.c
> index c4d62fe..01399b6 100644
> --- a/cr-dump.c
> +++ b/cr-dump.c
> @@ -354,7 +354,6 @@ static int dump_one_fd(pid_t pid, int pid_fd_dir, char *d_name, struct cr_fdset
> }
>
> if (S_ISREG(fd_stat.st_mode) ||
> - S_ISDIR(fd_stat.st_mode) ||
> (S_ISCHR(fd_stat.st_mode) && major(fd_stat.st_rdev) == MEM_MAJOR)) {
>
> p.id = MAKE_FD_GENID(fd_stat.st_dev, fd_stat.st_ino, p.pos);
>
More information about the CRIU
mailing list