[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4931240A.703@cosmosbay.com>
Date: Sat, 29 Nov 2008 12:14:18 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Jörn Engel <joern@...fs.org>
CC: Ingo Molnar <mingo@...e.hu>, Christoph Hellwig <hch@...radead.org>,
David Miller <davem@...emloft.net>,
"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org,
"kernel-testers@...r.kernel.org >> Kernel Testers List"
<kernel-testers@...r.kernel.org>, Mike Galbraith <efault@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linux Netdev List <netdev@...r.kernel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>
Subject: Re: [PATCH v2 4/5] fs: Introduce SINGLE dentries for pipes, socket,
anon fd
Jörn Engel a écrit :
> 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 = d_alloc(NULL, name);
>> + if (entry) {
>> + entry->d_sb = inode->i_sb;
>> + entry->d_parent = entry;
>> + entry->d_flags |= DCACHE_SINGLE | DCACHE_DISCONNECTED;
>> + entry->d_inode = inode;
>> + fsnotify_d_instantiate(entry, inode);
>> + security_d_instantiate(entry, inode);
>> + }
>> + return entry;
>
> 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.
>
>> @@ -918,7 +906,7 @@ struct file *create_write_pipe(int flags)
>> struct inode *inode;
>> struct file *f;
>> struct dentry *dentry;
>> - struct qstr name = { .name = "" };
>> + static const struct qstr name = { .name = "" };
>>
>> err = -ENFILE;
>> inode = 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, int flags)
>> {
>> struct dentry *dentry;
>> - struct qstr name = { .name = "" };
>> + static const struct qstr name = { .name = "" };
>
> These two could even be combined.
>
> 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örn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists