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
This commit is contained in:
parent
050eb30c42
commit
dc7a93fc9e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user