From 327000ce04b4243f140a38647dca59683d39b8e7 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Tue, 25 Feb 2020 00:38:23 +0100 Subject: Remove zfs_getattr and convoff dead code The `convoff` function is called only in one code path in `zfs_space`. Each caller of `zfs_space` is called with a `flock64_t` that has `l_whence` set to `SEEK_SET`. This means that `convoff` always results in a no-op as the `bfp` parameter has `l_whence` set to `SEEK_SET` and `int whence` is `SEEK_SET` as well. Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: Dirkjan Bussink Closes #10006 --- include/os/linux/zfs/sys/zfs_vnops.h | 1 - include/sys/dmu.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/os/linux/zfs/sys/zfs_vnops.h b/include/os/linux/zfs/sys/zfs_vnops.h index b05bb00b7..24a2082d3 100644 --- a/include/os/linux/zfs/sys/zfs_vnops.h +++ b/include/os/linux/zfs/sys/zfs_vnops.h @@ -59,7 +59,6 @@ extern int zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd, cred_t *cr, int flags); extern int zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr); extern int zfs_fsync(znode_t *zp, int syncflag, cred_t *cr); -extern int zfs_getattr(struct inode *ip, vattr_t *vap, int flag, cred_t *cr); extern int zfs_getattr_fast(struct inode *ip, struct kstat *sp); extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr); extern int zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp, diff --git a/include/sys/dmu.h b/include/sys/dmu.h index e497d21c9..928ee763d 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -938,7 +938,7 @@ void dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi); void dmu_object_info_from_db(dmu_buf_t *db, dmu_object_info_t *doi); /* * Like dmu_object_info_from_db, but faster still when you only care about - * the size. This is specifically optimized for zfs_getattr(). + * the size. */ void dmu_object_size_from_db(dmu_buf_t *db, uint32_t *blksize, u_longlong_t *nblk512); -- cgit v1.2.3