FreeBSD: Cleanup zfs_readdir()

The FreeBSD project's coverity scans found dead code in `zfs_readdir()`.
Also, the comment above `zfs_readdir()` is out of date.

I fixed the comment and deleted all of the dead code, plus additional
dead code that was found upon review.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13924
This commit is contained in:
Richard Yao
2022-09-20 17:50:16 -04:00
committed by GitHub
parent 9276e202eb
commit 3f400b0f58
5 changed files with 16 additions and 138 deletions
-13
View File
@@ -44,8 +44,6 @@
#define IS_DEVVP(vp) \
((vp)->v_type == VCHR || (vp)->v_type == VBLK || (vp)->v_type == VFIFO)
#define V_XATTRDIR 0x0000 /* attribute unnamed directory */
#define AV_SCANSTAMP_SZ 32 /* length of anti-virus scanstamp */
/*
@@ -193,11 +191,6 @@
#define MODEMASK 07777 /* mode bits plus permission bits */
#define PERMMASK 00777 /* permission bits */
/*
* VOP_ACCESS flags
*/
#define V_ACE_MASK 0x1 /* mask represents NFSv4 ACE permissions */
/*
* Flags for vnode operations.
*/
@@ -234,12 +227,6 @@ struct taskq;
#define CREATE_XATTR_DIR 0x04 /* Create extended attr dir */
#define LOOKUP_HAVE_SYSATTR_DIR 0x08 /* Already created virtual GFS dir */
/*
* Flags for VOP_READDIR
*/
#define V_RDDIR_ENTFLAGS 0x01 /* request dirent flags */
#define V_RDDIR_ACCFILTER 0x02 /* filter out inaccessible dirents */
/*
* Public vnode manipulation functions.
*/