Skip to content

Commit

Permalink
NFSv4.1: Fix a refcounting issue in the pNFS device id cache
Browse files Browse the repository at this point in the history
When we add something to the global device id cache, we need to bump the
reference count, so that the cache itself holds a reference.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 15, 2011
1 parent c9c30dd commit 1d92a08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/pnfs_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ nfs4_insert_deviceid_node(struct nfs4_deviceid_node *new)

hlist_add_head_rcu(&new->node, &nfs4_deviceid_cache[hash]);
spin_unlock(&nfs4_deviceid_lock);
atomic_inc(&new->ref);

return new;
}
Expand Down

0 comments on commit 1d92a08

Please sign in to comment.