NFSv4: Fix an Oops in the open recovery code
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 5 Jun 2012 13:16:47 +0000 (09:16 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 5 Jun 2012 14:00:14 +0000 (10:00 -0400)
commit1549210fcc17e9ae20c09ac8cd4c48a8dfd431bd
tree87db73acf11d00c1c4366e488faf86cd70ed996a
parentb3b02ae5865c2dcd506322e0fc6def59a042e72f
NFSv4: Fix an Oops in the open recovery code

The open recovery code does not need to request a new value for the
mdsthreshold, and so does not allocate a struct nfs4_threshold.
The problem is that encode_getfattr_open() will still request an
mdsthreshold, and so we end up Oopsing in decode_attr_mdsthreshold.

This patch fixes encode_getfattr_open so that it doesn't request an
mdsthreshold when the caller isn't asking for one. It also fixes
decode_attr_mdsthreshold so that it errors if the server returns
an mdsthreshold that we didn't ask for (instead of Oopsing).

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Andy Adamson <andros@netapp.com>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_xdr.h