From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH v2 4/5] fs: Introduce SINGLE dentries for pipes, socket, anon fd Date: Sat, 29 Nov 2008 12:14:18 +0100 Message-ID: <4931240A.703@cosmosbay.com> References: <20081121083044.GL16242@elte.hu> <49267694.1030506@cosmosbay.com> <20081121.010508.40225532.davem@davemloft.net> <4926AEDB.10007@cosmosbay.com> <4926D022.5060008@cosmosbay.com> <20081121152148.GA20388@elte.hu> <4926D39D.9050603@cosmosbay.com> <20081121153453.GA23713@elte.hu> <492DDB6A.8090806@cosmosbay.com> <493100E7.3030907@cosmosbay.com> <20081129103836.GA11959@logfs.org> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20081129103836.GA11959-PCqxUs/MD9bYtjvyW6yDsg@public.gmane.org> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8"; format="flowed" To: =?UTF-8?B?SsO2cm4gRW5nZWw=?= Cc: Ingo Molnar , Christoph Hellwig , David Miller , "Rafael J. Wysocki" , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> Kernel Testers List" , Mike Galbraith , Peter Zijlstra , Linux Netdev List , Christoph Lameter , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Al Viro J=C3=B6rn Engel a =C3=A9crit : > On Sat, 29 November 2008 09:44:23 +0100, Eric Dumazet wrote: >> +struct dentry *d_alloc_single(const struct qstr *name, struct inode= *inode) >> +{ >> + struct dentry *entry; >> + >> + entry =3D d_alloc(NULL, name); >> + if (entry) { >> + entry->d_sb =3D inode->i_sb; >> + entry->d_parent =3D entry; >> + entry->d_flags |=3D DCACHE_SINGLE | DCACHE_DISCONNECTED; >> + entry->d_inode =3D inode; >> + fsnotify_d_instantiate(entry, inode); >> + security_d_instantiate(entry, inode); >> + } >> + return entry; >=20 > Calling the struct dentry entry had me onfused a bit. I believe > everyone else (including the code you removed) uses dentry. Ah yes, it seems I took it from d_instantiate(), I guess a cleanup patch would be nice. >=20 >> @@ -918,7 +906,7 @@ struct file *create_write_pipe(int flags) >> struct inode *inode; >> struct file *f; >> struct dentry *dentry; >> - struct qstr name =3D { .name =3D "" }; >> + static const struct qstr name =3D { .name =3D "" }; >> =20 >> err =3D -ENFILE; >> inode =3D get_pipe_inode(); > ... >> @@ -371,20 +358,13 @@ static int sock_alloc_fd(struct file **filep, = int flags) >> static int sock_attach_fd(struct socket *sock, struct file *file, i= nt flags) >> { >> struct dentry *dentry; >> - struct qstr name =3D { .name =3D "" }; >> + static const struct qstr name =3D { .name =3D "" }; >=20 > These two could even be combined. >=20 > And of course I realize that I comment on absolute trivialities. On = the > whole, I couldn't spot a real problem in your patches. Well, at least you reviewed it, it's the important point ! Thanks J=C3=B6rn