nfsd: simplify stateid allocation and file handling
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 25 Jul 2014 11:34:19 +0000 (07:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 29 Jul 2014 18:49:51 +0000 (14:49 -0400)
Don't allow stateids to clear the open file pointer until they are
being destroyed. In a later patches we'll want to rely on the fact that
we have a valid file pointer when dealing with the stateid and this
will save us from having to do a lot of NULL pointer checks before
doing so.

Also, move to allocating stateids with kzalloc and get rid of the
explicit zeroing of fields.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

Simple merge