mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Linux: Check return code from VerifyVCache in mmap
afs_linux_mmap wasn't doing anything with the return code from afs_linux_VerifyVCache. Change the code so that it matches the other callers of afs_linux_VerifyVCache Change-Id: I83b949bf3b9579e5dd2e20b487862566c1d7c730 Reviewed-on: http://gerrit.openafs.org/2247 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
4c89b6417f
commit
f9c9b78a2c
@ -379,16 +379,18 @@ afs_linux_mmap(struct file *fp, struct vm_area_struct *vmap)
|
||||
/* get a validated vcache entry */
|
||||
code = afs_linux_VerifyVCache(vcp, NULL);
|
||||
|
||||
/* Linux's Flushpage implementation doesn't use credp, so optimise
|
||||
* our code to not need to crref() it */
|
||||
osi_FlushPages(vcp, NULL); /* ensure stale pages are gone */
|
||||
if (code == 0) {
|
||||
/* Linux's Flushpage implementation doesn't use credp, so optimise
|
||||
* our code to not need to crref() it */
|
||||
osi_FlushPages(vcp, NULL); /* ensure stale pages are gone */
|
||||
AFS_GUNLOCK();
|
||||
code = generic_file_mmap(fp, vmap);
|
||||
AFS_GLOCK();
|
||||
if (!code)
|
||||
vcp->f.states |= CMAPPED;
|
||||
}
|
||||
AFS_GUNLOCK();
|
||||
code = generic_file_mmap(fp, vmap);
|
||||
AFS_GLOCK();
|
||||
if (!code)
|
||||
vcp->f.states |= CMAPPED;
|
||||
|
||||
AFS_GUNLOCK();
|
||||
return code;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user