NFSv4: Don't use the delegation->inode in nfs_mark_return_delegation()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 25 Jul 2011 19:37:29 +0000 (15:37 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Aug 2011 04:58:40 +0000 (21:58 -0700)
commit1fcb9d4b03b6ad6f4de417bbbe21d82123290114
tree6f5a9df4af2fc061194198fec3018e843781affa
parent83d20a07d3fc171d5d7cddb6ebe2cd7a5fee1047
NFSv4: Don't use the delegation->inode in nfs_mark_return_delegation()

commit ed1e6211a0a134ff23592c6f057af982ad5dab52 upstream.

nfs_mark_return_delegation() is usually called without any locking, and
so it is not safe to dereference delegation->inode. Since the inode is
only used to discover the nfs_client anyway, it makes more sense to
have the callers pass a valid pointer to the nfs_server as a parameter.

Reported-by: Ian Kent <raven@themaw.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/delegation.c