NFS/filelayout: Fix racy setting of fl->dsaddr in filelayout_check_deviceid()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 20 Jul 2017 21:00:02 +0000 (17:00 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 21 Jul 2017 18:08:45 +0000 (14:08 -0400)
commit1ebf980127924c639e2b85c08468311ba1c95b70
tree514331ff7257270cc81f6963cc483b91cd0f0530
parentecbb903c56745d59c301db26dd7d8b74b520eb84
NFS/filelayout: Fix racy setting of fl->dsaddr in filelayout_check_deviceid()

We must set fl->dsaddr once, and once only, even if there are multiple
processes calling filelayout_check_deviceid() for the same layout
segment.

Reported-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/filelayout/filelayout.c