Date: Sun, 26 Feb 2012 22:12:48 +0100 From: Ed Schouten <ed@80386.nl> To: Jilles Tjoelker <jilles@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232183 - head/sys/kern Message-ID: <20120226211248.GO32748@hoeg.nl> In-Reply-To: <201202261514.q1QFET0v070810@svn.freebsd.org> References: <201202261514.q1QFET0v070810@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--muT+E17Lr9urPYYJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jilles, * Jilles Tjoelker <jilles@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 =3D fp->f_data; > + if (cpipe->pipe_state & PIPE_NAMED) > + error =3D vn_chmod(fp, mode, active_cred, td); > + else > + error =3D 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? --=20 Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ --muT+E17Lr9urPYYJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iQIcBAEBAgAGBQJPSqBQAAoJEG5e2P40kaK7d6wP/A5/zifopAwbfdOAYtZxltsR 71A7spratlXH4d+hTpw8T2UERHZ/f12FieBTodAVgzr3lJ75P+5l+gR3gM3MWhIG Zgz712HcCdkFyo6JnFx2PY4HeyRGvErBrvJ3vCbAXN1quwSynShvwOvFhP+45yAK FjsV2KQmQ+1sNQdH2oftP1QpcX/dAjU2olRDyP+8QGNmSK7w2IAKJkzuV7FieMc2 rtj36QyElaNGJJCOGpJvfgyaNI5ly0U1s3P2G32zXLLzor0/TuWc5VAMEHZquTcu TGKMvTx/0XzanAv4Xyot9qaslaWtBNSOvzzpCUu7mbMCXawE14HPp7kBQ3LnQbxH VUTtGtD+Voo1skc4xtW1ad42dHgH4k8+f3mw0pzYtibiNxn3SwDmW8mi2j0EHaiE MeJuinX4u7G6IsA5dTvEHuzQV/Nc60RfgmJRMpPNdjtu6z0wGyi8wN8MGgDsHSq7 O/GaDkMsN2J96Fu/ejYFQGKlJIy8kPZ3FPaE5IgUp2L5+VCFPhO/B//xHW7p+flF H7PILa7RQtw2HC6zX8vquS8KpBJJeigmqpIH0yb4RnNeB3Exh1Q5uXVhshJBm9OD ytK7jycShznMSE2ySMwCfwteXRuzVXt1wpbim7CYA2NNGii09h34IPp3+fKSwNbN YLobmbuadEF3XMRVvZq8 =FLIB -----END PGP SIGNATURE----- --muT+E17Lr9urPYYJ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120226211248.GO32748>