tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vfs question



Hi I am looking at code related to PR 53096 (really important please
look at it too), I came across this code, in vfs_vnode.c vrelel:


    732 		mutex_exit(vp->v_interlock);
    733 		error = vn_lock(vp,
    734 		    LK_EXCLUSIVE | LK_RETRY | (force ? 0 : LK_NOWAIT));
    735 		defer = (error != 0);
    736 		mutex_enter(vp->v_interlock);

Is this pattern of code legal? it looks like we are dropping all
locks, then making a reference to vp again (even dereferencing it), and
it might have been nuked from low orbit (freed) since we last had
guarantees about it.

Am I missing something?


Home | Main Index | Thread Index | Old Index