ext2fs: Use EXT2_LINK_MAX instead of LINK_MAX
Submitted by: Christoph Mallon MFC after: 2 weeks
This commit is contained in:
parent
2ebed5db20
commit
fdc100e4c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246347
@ -730,7 +730,7 @@ ext2_link(ap)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
ip = VTOI(vp);
|
ip = VTOI(vp);
|
||||||
if ((nlink_t)ip->i_nlink >= LINK_MAX) {
|
if ((nlink_t)ip->i_nlink >= EXT2_LINK_MAX) {
|
||||||
error = EMLINK;
|
error = EMLINK;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -841,7 +841,7 @@ ext2_rename(ap)
|
|||||||
goto abortit;
|
goto abortit;
|
||||||
dp = VTOI(fdvp);
|
dp = VTOI(fdvp);
|
||||||
ip = VTOI(fvp);
|
ip = VTOI(fvp);
|
||||||
if (ip->i_nlink >= LINK_MAX) {
|
if (ip->i_nlink >= EXT2_LINK_MAX) {
|
||||||
VOP_UNLOCK(fvp, 0);
|
VOP_UNLOCK(fvp, 0);
|
||||||
error = EMLINK;
|
error = EMLINK;
|
||||||
goto abortit;
|
goto abortit;
|
||||||
@ -939,7 +939,7 @@ ext2_rename(ap)
|
|||||||
* parent we don't fool with the link count.
|
* parent we don't fool with the link count.
|
||||||
*/
|
*/
|
||||||
if (doingdirectory && newparent) {
|
if (doingdirectory && newparent) {
|
||||||
if ((nlink_t)dp->i_nlink >= LINK_MAX) {
|
if ((nlink_t)dp->i_nlink >= EXT2_LINK_MAX) {
|
||||||
error = EMLINK;
|
error = EMLINK;
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
@ -1160,7 +1160,7 @@ ext2_mkdir(ap)
|
|||||||
panic("ext2_mkdir: no name");
|
panic("ext2_mkdir: no name");
|
||||||
#endif
|
#endif
|
||||||
dp = VTOI(dvp);
|
dp = VTOI(dvp);
|
||||||
if ((nlink_t)dp->i_nlink >= LINK_MAX) {
|
if ((nlink_t)dp->i_nlink >= EXT2_LINK_MAX) {
|
||||||
error = EMLINK;
|
error = EMLINK;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -1524,7 +1524,7 @@ ext2_pathconf(ap)
|
|||||||
|
|
||||||
switch (ap->a_name) {
|
switch (ap->a_name) {
|
||||||
case _PC_LINK_MAX:
|
case _PC_LINK_MAX:
|
||||||
*ap->a_retval = LINK_MAX;
|
*ap->a_retval = EXT2_LINK_MAX;
|
||||||
return (0);
|
return (0);
|
||||||
case _PC_NAME_MAX:
|
case _PC_NAME_MAX:
|
||||||
*ap->a_retval = NAME_MAX;
|
*ap->a_retval = NAME_MAX;
|
||||||
|
Loading…
Reference in New Issue
Block a user