svn commit: r326997 - head/sys/fs/nandfs
John Baldwin
jhb at FreeBSD.org
Tue Dec 19 20:17:09 UTC 2017
Author: jhb
Date: Tue Dec 19 20:17:07 2017
New Revision: 326997
URL: https://svnweb.freebsd.org/changeset/base/326997
Log:
Honor NANDFS_LINK_MAX for post-ino64.
This uses NANDFS_LINK_MAX instead of LINK_MAX for link overflow checks
and the value reported by pathconf() / fpathconf().
Sponsored by: Chelsio Communications
Modified:
head/sys/fs/nandfs/nandfs_vnops.c
Modified: head/sys/fs/nandfs/nandfs_vnops.c
==============================================================================
--- head/sys/fs/nandfs/nandfs_vnops.c Tue Dec 19 20:07:57 2017 (r326996)
+++ head/sys/fs/nandfs/nandfs_vnops.c Tue Dec 19 20:17:07 2017 (r326997)
@@ -1354,7 +1354,7 @@ nandfs_link(struct vop_link_args *ap)
struct nandfs_inode *inode = &node->nn_inode;
int error;
- if (inode->i_links_count >= LINK_MAX)
+ if (inode->i_links_count >= NANDFS_LINK_MAX)
return (EMLINK);
if (inode->i_flags & (IMMUTABLE | APPEND))
@@ -1576,7 +1576,7 @@ abortit:
fdnode = VTON(fdvp);
fnode = VTON(fvp);
- if (fnode->nn_inode.i_links_count >= LINK_MAX) {
+ if (fnode->nn_inode.i_links_count >= NANDFS_LINK_MAX) {
VOP_UNLOCK(fvp, 0);
error = EMLINK;
goto abortit;
@@ -1839,7 +1839,7 @@ nandfs_mkdir(struct vop_mkdir_args *ap)
if (nandfs_fs_full(dir_node->nn_nandfsdev))
return (ENOSPC);
- if (dir_inode->i_links_count >= LINK_MAX)
+ if (dir_inode->i_links_count >= NANDFS_LINK_MAX)
return (EMLINK);
error = nandfs_node_create(nmp, &node, mode);
@@ -2239,7 +2239,7 @@ nandfs_pathconf(struct vop_pathconf_args *ap)
error = 0;
switch (ap->a_name) {
case _PC_LINK_MAX:
- *ap->a_retval = LINK_MAX;
+ *ap->a_retval = NANDFS_LINK_MAX;
break;
case _PC_NAME_MAX:
*ap->a_retval = NANDFS_NAME_LEN;
More information about the svn-src-all
mailing list