diff options
| author | Warner Losh <imp@FreeBSD.org> | 1999-03-02 05:31:47 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1999-03-02 05:31:47 +0000 |
| commit | 5369eb85cac146ad1ef22a21b6676c7496e5c080 (patch) | |
| tree | e06939831a4647158aae7fa8b4d246569ff26b73 /sys/gnu/ext2fs | |
| parent | 86bf56f58bd18214ed9989835b408d2ac3e80f64 (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 8463a3008b880..006687b8d79a7 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); |
