NFS41: make close wait for layoutreturn
authorPeng Tao <tao.peng@primarydata.com>
Tue, 22 Sep 2015 03:35:22 +0000 (11:35 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 23 Sep 2015 12:55:32 +0000 (08:55 -0400)
If we send a layoutreturn asynchronously before close, the close
might reach server first and layoutreturn would fail with BADSTATEID
because there is nothing keeping the layout stateid alive.

Also do not pretend sending layoutreturn if we are not.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h

Simple merge
diff --cc fs/nfs/pnfs.c
Simple merge
diff --cc fs/nfs/pnfs.h
Simple merge