mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
Linux: don't oops on writeback if vcache has no stashed credentials
When doing writeback, use current credentials if we can't find stashed credentials in the vcache entry. This is normally stashed in afs_open, so it's not clear how we get to that point, but that's not a reason to trigger an oops. Change-Id: I60937e3f9e360e68ea84205570c05cabb47ef08e Reviewed-on: http://gerrit.openafs.org/1063 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
747a8c0642
commit
94ff83fee8
@ -2171,7 +2171,10 @@ afs_linux_writepage(struct page *pp)
|
||||
/* Grab the creds structure currently held in the vnode, and
|
||||
* get a reference to it, in case it goes away ... */
|
||||
credp = vcp->cred;
|
||||
crhold(credp);
|
||||
if (credp)
|
||||
crhold(credp);
|
||||
else
|
||||
credp = crref();
|
||||
ReleaseWriteLock(&vcp->lock);
|
||||
AFS_GUNLOCK();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user