On Mon, 9 Sep 2002, Don Lewis wrote:

> nfs_link() contains the following code:
> 
>         /*
>          * Push all writes to the server, so that the attribute cache
>          * doesn't get "out of sync" with the server.
>          * XXX There should be a better way!
>          */
>         VOP_FSYNC(vp, cnp->cn_cred, MNT_WAIT, cnp->cn_thread);
> 
> The problem is that vp is not locked by the caller, but VOP_FSYNC() 
> expects its argument to be locked. 
> 
> I think we can probably just lock and unlock vp around the call to
> VOP_FSYNC() ...

What I'd actually like to do is lock vp on going in to the VOP.  I need to
grab the lock in the link() code anyway to do the MAC check.  UFS and
others all immediately lock the vnode on entry anyway...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
[EMAIL PROTECTED]      Network Associates Laboratories



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to