Re: [PATCH 8/9] vfs: split __lookup_hash

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

 



On Tue, Mar 06, 2012 at 01:56:40PM +0100, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@xxxxxxx>
> 
> Split __lookup_hash into two component functions:
> 
>  lookup_dcache - tries cached lookup, returns whether real lookup is needed
>  lookup_real - calls i_op->lookup
> 
> This eliminates code duplication between d_alloc_and_lookup() and
> d_inode_lookup().

The return value from lookup_dcache is a bit confusing.  What about
returning the need_lookup flag, and passing the dentry as a parameter,
that way the callers would do the more obvious:

	if (lookup_dcache(name, base, nd, &dentry))
		return dentry;

instead of having to check two conditions.

--
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