aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/ext2fs
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1999-03-02 05:31:47 +0000
committerWarner Losh <imp@FreeBSD.org>1999-03-02 05:31:47 +0000
commit5369eb85cac146ad1ef22a21b6676c7496e5c080 (patch)
treee06939831a4647158aae7fa8b4d246569ff26b73 /sys/gnu/ext2fs
parent86bf56f58bd18214ed9989835b408d2ac3e80f64 (diff)
Notes
Diffstat (limited to 'sys/gnu/ext2fs')
-rw-r--r--sys/gnu/ext2fs/ext2_vnops.c5
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);