Hi Jilles,

* Jilles Tjoelker <jil...@freebsd.org>, 20120226 16:14:
> +static int
> +pipe_chmod(fp, mode, active_cred, td)
> +     struct file *fp;
> +     mode_t mode;
> +     struct ucred *active_cred;
> +     struct thread *td;
> +{
> +     struct pipe *cpipe;
> +     int error;
> +
> +     cpipe = fp->f_data;
> +     if (cpipe->pipe_state & PIPE_NAMED)
> +             error = vn_chmod(fp, mode, active_cred, td);
> +     else
> +             error = invfo_chmod(fp, mode, active_cred, td);
> +     return (error);
> +}

Maybe this would be a useless optimisation, but wouldn't it be better to
just use two separate struct fileops here?

-- 
 Ed Schouten <e...@80386.nl>
 WWW: http://80386.nl/

Attachment: pgpG4wj7wUTnj.pgp
Description: PGP signature

Reply via email to