OSDN Git Service

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)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 7 Jan 2022 16:59:31 +0000 (11:59 -0500)
commit1751fc1db36f6f411709e143d5393f92d12137a9
tree0d6e8fefd8236b4b6ffe6a9665d66eee7e9246fb
parentac795161c93699d600db16c1a8cc23a65a1eceaf
NFSv4: nfs_atomic_open() can race when looking up a non-regular file

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>
fs/nfs/dir.c