diff options
| author | Warner Losh <imp@FreeBSD.org> | 1999-03-10 16:57:53 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1999-03-10 16:57:53 +0000 |
| commit | b3983ee3c14b72f1635d3e8d62d35b45773178b1 (patch) | |
| tree | f1d06de1b58f5d343d358dd719990f8627c1412c /sys/gnu/ext2fs | |
| parent | 118d0b1fc1bca2778177a1f1853412390dd4a46f (diff) | |
Notes
Diffstat (limited to 'sys/gnu/ext2fs')
| -rw-r--r-- | sys/gnu/ext2fs/ext2_vnops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c index f3b9bcc17109..69261d6dc23f 100644 --- a/sys/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/ext2fs/ext2_vnops.c @@ -482,6 +482,11 @@ abortit: goto abortit; dp = VTOI(fdvp); ip = VTOI(fvp); + if (ip->i_nlink >= LINK_MAX) { + VOP_UNLOCK(fvp, 0, p); + error = EMLINK; + goto abortit; + } if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (dp->i_flags & APPEND)) { VOP_UNLOCK(fvp, 0, p); |
