aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ext2fs/ext2_vnops.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-07-11 21:55:20 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-07-11 21:55:20 +0000
commit15a88f8158d8b8ad6a304d7876e43d2f5ba2fe0d (patch)
treefa11e08ae9aa54ed9f0f7f5d08fa008c947df855 /sys/fs/ext2fs/ext2_vnops.c
parent4e287bd860de6b7aecb382a4685833e68cfeb28e (diff)
downloadsrc-15a88f8158d8b8ad6a304d7876e43d2f5ba2fe0d.tar.gz
src-15a88f8158d8b8ad6a304d7876e43d2f5ba2fe0d.zip
Consistently use vop_stdpathconf() for default pathconf values.
Update filesystems not currently using vop_stdpathconf() in pathconf VOPs to use vop_stdpathconf() for any configuration variables that do not have filesystem-specific values. vop_stdpathconf() is used for variables that have system-wide settings as well as providing default values for some values based on system limits. Filesystems can still explicitly override individual settings. PR: 219851 Reported by: cem Reviewed by: cem, kib, ngie MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11541
Notes
Notes: svn path=/head/; revision=320900
Diffstat (limited to 'sys/fs/ext2fs/ext2_vnops.c')
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index 7aced4b5f1b2..d5fd6260b890 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -1627,18 +1627,6 @@ ext2_pathconf(struct vop_pathconf_args *ap)
else
*ap->a_retval = ext2_max_nlink(VTOI(ap->a_vp));
break;
- case _PC_NAME_MAX:
- *ap->a_retval = NAME_MAX;
- break;
- case _PC_PATH_MAX:
- *ap->a_retval = PATH_MAX;
- break;
- case _PC_PIPE_BUF:
- *ap->a_retval = PIPE_BUF;
- break;
- case _PC_CHOWN_RESTRICTED:
- *ap->a_retval = 1;
- break;
case _PC_NO_TRUNC:
*ap->a_retval = 1;
break;
@@ -1661,11 +1649,6 @@ ext2_pathconf(struct vop_pathconf_args *ap)
case _PC_MIN_HOLE_SIZE:
*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
break;
- case _PC_ASYNC_IO:
- /* _PC_ASYNC_IO should have been handled by upper layers. */
- KASSERT(0, ("_PC_ASYNC_IO should not get here"));
- error = EINVAL;
- break;
case _PC_PRIO_IO:
*ap->a_retval = 0;
break;
@@ -1695,7 +1678,7 @@ ext2_pathconf(struct vop_pathconf_args *ap)
break;
default:
- error = EINVAL;
+ error = vop_stdpathconf(ap);
break;
}
return (error);