Re: [patch 01/10] fs: fix do_lookup false negative

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

 



Nick Piggin <npiggin@xxxxxxxxx> writes:

> fs: fix do_lookup false negative
>
> In do_lookup, if we initially find no dentry, we take the directory i_mutex and
> re-check the lookup. If we find a dentry there, then we revalidate it if
> needed. However if that revalidate asks for the dentry to be invalidated, we
> return -ENOENT from do_lookup. What should happen instead is an attempt to
> allocate and lookup a new dentry.
>
> This is probably not noticed because it is rare. It is only reached if a
> concurrent create races in first (in which case, the dentry probably won't be
> invalidated anyway), or if the racy __d_lookup has failed due to a
> false-negative (which is very rare).
>
> Fix this by removing code and have it use the normal reval path.

Looks good, but a comment would be good.

Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

-Andi

-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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