Re: [patch 5/6] vfs: optimization to /proc/<pid>/mountinfo patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 13, 2008 at 10:26:46PM +0100, Miklos Szeredi wrote:
> +static int prepend(char **buffer, int *buflen, const char *str,
> +			  int namelen)

inline, please.

> @@ -1911,10 +1902,9 @@ char *dentry_path(struct dentry *dentry,
>  
>  	spin_lock(&dcache_lock);
>  	prepend(&end, &buflen, "\0", 1);
> -	if (!IS_ROOT(dentry) && d_unhashed(dentry)) {
> -		if (prepend(&end, &buflen, "//deleted", 9))
> +	if (!IS_ROOT(dentry) && d_unhashed(dentry) &&
> +		(prepend(&end, &buflen, " (deleted)", 10) != 0))
>  			goto Elong;

That's a bad idea:
	* we bloody well might want to use it outside of procfs
	* //deleted is _better_; you can't have an empty path component,
but you can have a pathname ending on " (deleted)".

> +#ifdef CONFIG_PROC_FS
>  /*
>   * returns the path of the 'dentry' from the root of its filesystem.
>   */
> @@ -411,7 +412,7 @@ int seq_dentry(struct seq_file *m, struc
>  	m->count = m->size;
>  	return -1;
>  }
> -EXPORT_SYMBOL(seq_dentry);
> +#endif /* CONFIG_PROC_FS */

Same comment; you don't need procfs to use seq_file.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux