NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is to return the expected ENOTDIR error in these cases. Reported-by:Lyu Tao <tao.lyu@epfl.ch> Fixes: 0dd2b474 ("nfs: implement i_op->atomic_open()") Signed-off-by:
Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by:
Anna Schumaker <Anna.Schumaker@Netapp.com>
parent
34bf20ce
-
mentioned in commit ce8c552b
-
mentioned in commit 4c36ca38
-
mentioned in commit f0583af8
-
mentioned in commit 0dfacee4
-
mentioned in commit 516f348b
-
mentioned in commit b00b4c6f
-
mentioned in commit 8788981e
-
mentioned in commit e0caaf75
-
mentioned in commit 2e4841a2
-
mentioned in commit 67552482
-
mentioned in commit a7fd396a
-
mentioned in commit f9b7385c
-
mentioned in commit f1322f10
-
mentioned in commit aab7d08f
-
mentioned in commit 357d42d5
Please register or sign in to comment