NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 26 Feb 2019 16:19:46 +0000 (11:19 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 1 Mar 2019 21:20:16 +0000 (16:20 -0500)
commit108bb4afd351d65826648a47f11fa3104e250d9b
tree5424da4ab5c98f6c7bc56894b49b55cd246033bd
parent1a3466aed3a17eed41cd9411f89eb637f58349b0
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()

If the attempt to instantiate the mirror's layout DS pointer failed,
then that pointer may hold a value of type ERR_PTR(), so we need
to check that before we dereference it.

Fixes: 65990d1afbd2d ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/flexfilelayout/flexfilelayout.h