[RFC] EOPENSTALE handling in path_openat()

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

 



	We have something very odd in the end of path_openat():

        if (error == -EOPENSTALE) {
		if (flags & LOOKUP_RCU)
			error = -ECHILD;
		else   
			error = -ESTALE;
	}

Note that *nothing* that may return EOPENSTALE is ever called in
RCU mode, pretty much by definition - we must have done something
blocking to have gotten that and in RCU mode that's not going to
happen.

This check does not look for RCU mode, though - it checks whether
we'd *started* in RCU mode, ignoring any successful unlazy that
might have landed us in non-RCU mode.  So this ECHILD is not
a dead code.

It really looks like it ought to have been - there's nothing
a retry in non-RCU mode would have solved; the checks on ->d_seq
should've guaranteed that there had been possible timings for
just that tree traversal in non-RCU mode, hitting exact same
dentries.  If they hadn't, we have a much worse problem there...

Miklos, could you recall what was the original intent of that?
Do we want to keep that logics there, or should it just turn into
"map -ENOPENSTALE to -ESTALE??




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

  Powered by Linux