Al Viro 97242f99a0 link_path_walk(): be careful when failing with ENOTDIR
In RCU mode we might end up with dentry evicted just we check
that it's a directory.  In such case we should return ECHILD
rather than ENOTDIR, so that pathwalk would be retries in non-RCU
mode.

Breakage had been introduced in commit b18825a - prior to that
we were looking at nd->inode, which had been fetched before
verifying that ->d_seq was still valid.  That form of check
would only be satisfied if at some point the pathname prefix
would indeed have resolved to a non-directory.  The fix consists
of checking ->d_seq after we'd run into a non-directory dentry,
and failing with ECHILD in case of mismatch.

Note that all branches since 3.12 have that problem...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-08-01 20:18:38 -04:00
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-23 18:01:59 -04:00
2015-07-09 11:42:21 -07:00
2015-06-25 17:00:42 -07:00
2015-07-09 11:42:21 -07:00
2015-06-27 09:47:46 -07:00
2015-04-21 16:16:02 -04:00
2015-07-09 11:42:21 -07:00
2015-07-09 11:42:21 -07:00
2015-04-11 22:29:40 -04:00
2015-06-02 09:22:34 -06:00
2015-07-09 11:42:21 -07:00
2015-05-31 13:23:08 +02:00