On Sun, Feb 26, 2012 at 10:12 PM, Ed Schouten <e...@80386.nl> wrote:
> 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?
>

I don't think the problem here is related to performance.
it might be a problem of readability.
I prefer to use one fileops for pipes and fifos just to remark
that fifos are actual pipes.
If others think that would be better to have two separated fileops,
for readability, I'm not against it.

--
Gianni
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to