Re: [patch] epoll use a single inode ...

From: Christoph Hellwig
Date: Thu Mar 08 2007 - 05:21:45 EST


On Thu, Mar 08, 2007 at 10:42:21AM +0100, Eric Dumazet wrote:
> @@ -1823,6 +1823,9 @@ char * d_path(struct dentry *dentry, str
> struct vfsmount *rootmnt;
> struct dentry *root;
>
> + if (dentry->d_op && dentry->d_op->d_dname)
> + return (dentry->d_op->d_dname)(dentry, buf, buflen);

Please don't put braces around the function pointer call. Also I
think we really want a comment here why we need this call.

> +static char * pipefs_dname(struct dentry *dentry, char *buffer, int buflen)

normally this would be:


static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen)

> +static char * sockfs_dname(struct dentry *dentry, char *buffer, int buflen)

same here.

> - char name[32];
>
> - this.len = sprintf(name, "[%lu]", SOCK_INODE(sock)->i_ino);
> - this.name = name;
> + this.len = 0;
> + this.name = "";
> this.hash = 0;

Can you add a helper to init this one?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/