nfs/flexfiles: send layoutreturn before freeing lseg
authorPeng Tao <tao.peng@primarydata.com>
Mon, 20 Oct 2014 06:44:38 +0000 (14:44 +0800)
committerTom Haynes <loghyr@primarydata.com>
Tue, 3 Feb 2015 19:06:50 +0000 (11:06 -0800)
commit27b6f53987d61822a858b4680c3727bfb19e620a
tree78412c8a81e1a51f3fc3ab3b1361ab460f187c9d
parent193e3aa2ccfb5a53acf7a690b80a1e415b74dbd7
nfs/flexfiles: send layoutreturn before freeing lseg

Otherwise we'll lose error tracking information when
encoding layoutreturn.

pnfs_put_lseg may be called from rpc callbacks. So we should not
call pnfs_send_layoutreturn directly because it can deadlock in
the rpc layer.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Tom Haynes <loghyr@primarydata.com>
fs/nfs/pnfs.c