]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pNFS/flexfiles: Fix an Oopsable condition when connection to the DS fails
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 29 Aug 2016 19:12:54 +0000 (15:12 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 29 Aug 2016 19:21:16 +0000 (15:21 -0400)
commit3dc147359e3dcdf0648f1e2c11f62cfae3160df0
tree1282ac36c201cdc5fab01357fe5910d234403e87
parentd138027a8256a3e9d7657c8d0dae84c08ef2cfe1
pNFS/flexfiles: Fix an Oopsable condition when connection to the DS fails

If the attempt to connect to a DS fails inside ff_layout_pg_init_read or
ff_layout_pg_init_write, then we currently end up clearing the layout
segment carried by the struct nfs_pageio_descriptor, causing an Oops
when we later call into ff_layout_read_pagelist/ff_layout_write_pagelist.

The fix is to ensure we return the layout and then retry.

Fixes: 446ca2195303 ("pNFS/flexfiles: When initing reads or writes, we...")
Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/flexfilelayout/flexfilelayout.c
fs/nfs/flexfilelayout/flexfilelayoutdev.c