diff options
| author | Alexander Kabaev <kan@FreeBSD.org> | 2003-11-19 04:14:42 +0000 |
|---|---|---|
| committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-11-19 04:14:42 +0000 |
| commit | c39134984175e4daa676d6c8bfa92c6eb400ee9d (patch) | |
| tree | 5d73ee8570b0a82ddaef4594728473f2807f25be | |
| parent | 501f5ff1238deb71c5d5b7015b4ed2d69990e8d0 (diff) | |
Notes
| -rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index a3e4c12ec345..4f4ab5487e84 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -395,12 +395,12 @@ fdesc_setattr(ap) return (error); } vp = fp->f_vnode; - if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) { - fdrop(fp, ap->a_td); - return (error); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, ap->a_td); + if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) == 0) { + error = VOP_SETATTR(vp, ap->a_vap, ap->a_cred, ap->a_td); + vn_finished_write(mp); } - error = VOP_SETATTR(vp, ap->a_vap, ap->a_cred, ap->a_td); - vn_finished_write(mp); + VOP_UNLOCK(vp, 0, ap->a_td); fdrop(fp, ap->a_td); return (error); } |
