]> 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)
commit4b41d858aa637db18b35079ad8b540f886a5b80d
tree1282ac36c201cdc5fab01357fe5910d234403e87
parent4d0c44a7899f957be0e9e8464c5bc9d5175e47ad
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: 403fcdabb4e8 ("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