]> git.baikalelectronics.ru Git - kernel.git/commit
fs: fix do_last error case when need_reval_dot
authorJ. R. Okajima <hooanon05@yahoo.co.jp>
Fri, 14 Jan 2011 03:56:04 +0000 (03:56 +0000)
committerNick Piggin <npiggin@kernel.dk>
Fri, 14 Jan 2011 03:56:04 +0000 (03:56 +0000)
commit3abb77e015f9f582cfc73a85c34086271ba61016
tree88ea4019a1a8a0a3b8c2f24479ec44b353928f3f
parenta5b0c1ab9737c027a1f435730e2f2f485e2ca190
fs: fix do_last error case when need_reval_dot

When open(2) without O_DIRECTORY opens an existing dir, it should return
EISDIR. In do_last(), the variable 'error' is initialized EISDIR, but it
is changed by d_revalidate() which returns any positive to represent
'the target dir is valid.'

Should we keep and return the initialized 'error' in this case.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
fs/namei.c