dir.c (c3b2344b93165eb3d87d1f3ac7642fec43b94956) | dir.c (af6726e657c0b1148075650d763ee80f9d863dbf) |
---|---|
1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 76 unchanged lines hidden (view full) --- 85 inpend = &inpsort[inplast]; 86 do { 87 change = 0; 88 for (inpp = inpsort; inpp < inpend; inpp++) { 89 inp = *inpp; 90 if (inp->i_parent == 0) 91 continue; 92 if (inoinfo(inp->i_parent)->ino_state == DFOUND && | 1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 76 unchanged lines hidden (view full) --- 85 inpend = &inpsort[inplast]; 86 do { 87 change = 0; 88 for (inpp = inpsort; inpp < inpend; inpp++) { 89 inp = *inpp; 90 if (inp->i_parent == 0) 91 continue; 92 if (inoinfo(inp->i_parent)->ino_state == DFOUND && |
93 inoinfo(inp->i_number)->ino_state == DSTATE) { | 93 INO_IS_DUNFOUND(inp->i_number)) { |
94 inoinfo(inp->i_number)->ino_state = DFOUND; 95 change++; 96 } 97 } 98 } while (change > 0); 99} 100 101/* --- 532 unchanged lines hidden (view full) --- 634 dirty(bp); 635 DIP_SET(dp, di_nlink, 2); 636 inodirty(); 637 if (ino == ROOTINO) { 638 inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink); 639 cacheino(dp, ino); 640 return(ino); 641 } | 94 inoinfo(inp->i_number)->ino_state = DFOUND; 95 change++; 96 } 97 } 98 } while (change > 0); 99} 100 101/* --- 532 unchanged lines hidden (view full) --- 634 dirty(bp); 635 DIP_SET(dp, di_nlink, 2); 636 inodirty(); 637 if (ino == ROOTINO) { 638 inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink); 639 cacheino(dp, ino); 640 return(ino); 641 } |
642 if (inoinfo(parent)->ino_state != DSTATE && 643 inoinfo(parent)->ino_state != DFOUND) { | 642 if (!INO_IS_DVALID(parent)) { |
644 freeino(ino); 645 return (0); 646 } 647 cacheino(dp, ino); 648 inp = getinoinfo(ino); 649 inp->i_parent = parent; 650 inp->i_dotdot = parent; 651 inoinfo(ino)->ino_state = inoinfo(parent)->ino_state; --- 63 unchanged lines hidden --- | 643 freeino(ino); 644 return (0); 645 } 646 cacheino(dp, ino); 647 inp = getinoinfo(ino); 648 inp->i_parent = parent; 649 inp->i_dotdot = parent; 650 inoinfo(ino)->ino_state = inoinfo(parent)->ino_state; --- 63 unchanged lines hidden --- |