NFSv4.1/flexfiles: Fix a protocol error in layoutreturn
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 28 Aug 2015 00:37:39 +0000 (20:37 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 28 Aug 2015 00:42:20 +0000 (20:42 -0400)
commitd13549074cf066d6d5bb29903d044beffea342d3
tree0d4167522dbc760366ff0fb9b66425c894d4d3ff
parent5334c5bdac926c5f8d89729beccb46fe88eda9e7
NFSv4.1/flexfiles: Fix a protocol error in layoutreturn

According to the flexfiles protocol, the layoutreturn should specify an
array of errors in the following format:

struct ff_ioerr4 {
offset4        ffie_offset;
length4        ffie_length;
stateid4       ffie_stateid;
device_error4  ffie_errors<>;
};

This patch fixes up the code to ensure that our ffie_errors is indeed
encoded as an array (albeit with only a single entry).

Reported-by: Tom Haynes <thomas.haynes@primarydata.com>
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/flexfilelayout/flexfilelayoutdev.c