]> git.baikalelectronics.ru Git - kernel.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)
commit34529881693a01e1fbd5cb99010c3d689d2716d9
tree1282ac36c201cdc5fab01357fe5910d234403e87
parenta97af393fbc3c2320569068459d7a8c3972bdb17
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: 1aa88d695841 ("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