Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/msdosfs/msdosfs_vnops.c
Show First 20 Lines • Show All 1,133 Lines • ▼ Show 20 Lines | abortit: | ||||
* have been unlinked or renamed. In either case there is | * have been unlinked or renamed. In either case there is | ||||
* no further work to be done. If the source is a directory | * no further work to be done. If the source is a directory | ||||
* then it cannot have been rmdir'ed or renamed; this is | * then it cannot have been rmdir'ed or renamed; this is | ||||
* prohibited by the DE_RENAME flag. | * prohibited by the DE_RENAME flag. | ||||
*/ | */ | ||||
if (xp != ip) { | if (xp != ip) { | ||||
if (doingdirectory) | if (doingdirectory) | ||||
panic("rename: lost dir entry"); | panic("rename: lost dir entry"); | ||||
VOP_UNLOCK(fvp); | |||||
if (newparent) | if (newparent) | ||||
VOP_UNLOCK(fdvp); | VOP_UNLOCK(fdvp); | ||||
vrele(ap->a_fvp); | vrele(ap->a_fvp); | ||||
kib: So why this vrele() uses a_vfp pointer instead of fvp ? Is it possible that they are different… | |||||
Done Inline ActionsIt is possible they are different - this code happens after a call to relookup(), which can change fvp. In fact, it has to be different, given the conditional ("xp != ip"). trasz: It is possible they are different - this code happens after a call to relookup(), which can… | |||||
xp = NULL; | xp = NULL; | ||||
} else { | } else { | ||||
vrele(fvp); | vrele(fvp); | ||||
xp = NULL; | xp = NULL; | ||||
/* | /* | ||||
* First write a new entry in the destination | * First write a new entry in the destination | ||||
* directory and mark the entry in the source directory | * directory and mark the entry in the source directory | ||||
▲ Show 20 Lines • Show All 814 Lines • Show Last 20 Lines |
So why this vrele() uses a_vfp pointer instead of fvp ? Is it possible that they are different (doubt it). If so wouldn't it be more natural to stop these intermediate vrele/unlocks, replacing them by final vput(fvp) ?