NFS: Fix put_nfs_open_context
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 26 Jul 2007 16:06:17 +0000 (12:06 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 7 Aug 2007 19:13:17 +0000 (15:13 -0400)
We need to grab the inode->i_lock atomically with the last reference put in
order to remove the open context that is being freed from the
nfsi->open_files list.

Fix by converting the kref to a standard atomic counter and then using
atomic_dec_and_lock()...

Thanks to Arnd Bergmann for pointing out the problem.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

No differences found