]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
NFSv4: nfs_atomic_open() can race when looking up a non-regular file
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 6 Jan 2022 23:24:03 +0000 (18:24 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 3 Feb 2022 09:28:51 +0000 (10:28 +0100)
commit5d26fecc093343e088417c697029f512dd8cdd50
tree1b34849b72c99c58a686c09ded9b5973f0f49125
parenta92d80d4d5ce3a52fbdab8668ad2f2e1ff0861bd
NFSv4: nfs_atomic_open() can race when looking up a non-regular file

BugLink: https://bugs.launchpad.net/bugs/1959879
commit 1751fc1db36f6f411709e143d5393f92d12137a9 upstream.

If the file type changes back to being a regular file on the server
between the failed OPEN and our LOOKUP, then we need to re-run the OPEN.

Fixes: 0dd2b474d0b6 ("nfs: implement i_op->atomic_open()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfs/dir.c