Re: [PATCH] expand: Check d_type in expmeta before recursing

Jilles Tjoelker <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On Sun, Jun 02, 2024 at 09:34:38AM +0800, Herbert Xu wrote:
> If the directory pointer is not a directory or symlink, do not
> recurse into expmeta.

> +		if (c && dp->d_type != DT_DIR && dp->d_type != DT_LNK)
> +			goto check_int;

Good idea, but DT_UNKNOWN might also be a directory or a symlink to one.

-- 
Jilles Tjoelker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.