[Libsysio-commit] HEAD: libsysio/src link.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2009-08-04 05:52:32
|
Update of /cvsroot/libsysio/libsysio/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10579 Modified Files: link.c Log Message: Weird thred-safe logic removed; I'll desl with it later when I get after the big lock. Modified to work with the new PB_SET_ASSOC logic. Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- link.c 3 Aug 2009 17:55:27 -0000 1.19 +++ link.c 4 Aug 2009 05:52:23 -0000 1.20 @@ -82,7 +82,7 @@ _sysio_p_link(struct pnode *old, struct if (err) return err; PB_SET_ASSOC(new->p_base, old->p_base->pb_ino); - I_REF(new->p_base->pb_ino); + I_GET(new->p_base->pb_ino); return 0; } @@ -103,28 +103,21 @@ SYSIO_INTERFACE_NAME(link)(const char *o _sysio_namei(_sysio_cwd, oldpath, 0, &intent, &old); if (err) break; - P_REF(old); - P_PUT(old); INTENT_INIT(&intent, INT_UPDPARENT, NULL, NULL); err = _sysio_namei(_sysio_cwd, newpath, ND_NEGOK, &intent, &new); if (err) break; - P_REF(new); - P_PUT(new); if (new->p_base->pb_ino) { err = -EEXIST; break; } - _sysio_p_get2(old, new->p_parent); err = _sysio_p_link(old, new); - P_PUT(new->p_parent); - P_PUT(old); } while (0); if (new) - P_RELE(new); + P_PUT(new); if (old) - P_RELE(old); + P_PUT(old); SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, link, "%d", 0); } |