afs: Fix key refcounting in file locking code
Fix the refcounting of the authentication keys in the file locking code.
The vnode->lock_key member points to a key on which it expects to be
holding a ref, but it isn't always given an extra ref, however.
Fixes: 0fafdc9f88
("afs: Fix file locking")
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -545,6 +545,8 @@ void afs_evict_inode(struct inode *inode)
|
||||
#endif
|
||||
|
||||
afs_put_permits(rcu_access_pointer(vnode->permit_cache));
|
||||
key_put(vnode->lock_key);
|
||||
vnode->lock_key = NULL;
|
||||
_leave("");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user