Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150563393
D35514.id107135.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
818 B
Referenced Files
None
Subscribers
None
D35514.id107135.diff
View Options
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1941,6 +1941,7 @@
struct vnode *tvp;
struct buf *bp;
struct dirtemplate dirtemplate, *dtp;
+ struct mount *mp;
struct direct newdir;
int error, dmode;
long blkoff;
@@ -1951,8 +1952,20 @@
#endif
dp = VTOI(dvp);
if (dp->i_nlink >= UFS_LINK_MAX) {
- error = EMLINK;
- goto out;
+ if (!DOINGSOFTDEP(dvp) || dp->i_effnlink >= UFS_LINK_MAX)
+ return (EMLINK);
+ mp = dvp->v_mount;
+ vfs_ref(mp);
+ VOP_UNLOCK(dvp);
+ error = vfs_busy(mp, 0);
+ if (error == 0) {
+ VFS_SYNC(mp, MNT_WAIT);
+ vfs_unbusy(mp);
+ error = ERELOOKUP;
+ }
+ vfs_rel(mp);
+ VOP_LOCK(dvp, LK_EXCLUSIVE | LK_RETRY);
+ return (error);
}
dmode = vap->va_mode & 0777;
dmode |= IFDIR;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 9:49 AM (12 m, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30752324
Default Alt Text
D35514.id107135.diff (818 B)
Attached To
Mode
D35514: UFS: make mkdir() and link() reliable when using SU and reaching nlink limit
Attached
Detach File
Event Timeline
Log In to Comment