From owner-freebsd-hackers Thu May 13 21:34:35 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 079DE15435 for ; Thu, 13 May 1999 21:34:33 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA97588; Thu, 13 May 1999 21:34:31 -0700 (PDT) (envelope-from dillon) Date: Thu, 13 May 1999 21:34:31 -0700 (PDT) From: Matthew Dillon Message-Id: <199905140434.VAA97588@apollo.backplane.com> To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: VOP_LEASE(...) or (void)VOP_LEASE(...)? References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :VOP_LEASE(...) always returns 0 so there is no actual need to check its :return value. But still it has a return value. So should we use :(void)VOP_LEASE(...) instead of just VOP_LEASE(...)? I think we should leave it an int. It may not always return 0 in the future. :BTW, I guess that the practice of modifying :default_vnodeop_p[VOFFSET(vop_lease)] in nfs_init() is a hack. Why do not :we use : : { &vop_lease_desc, (vop_t *) nqnfs_vop_lease_check }, : :instead of : : { &vop_lease_desc, (vop_t *) vop_null }, : :in nfsv2_vnodeop_entries[] in file nfs_vnops.c? : :Thanks for any help. I think the hack is in there in order to optimize code exclusion when NFS_NOSERVER is set. This is one of those "if it aint broke, don't fix it" situations. I know it's ugly, but the only things we should be patching into the NFS code right now are bug fixes. -Matt Matthew Dillon :-------------------------------------------------- :Zhihui Zhang. Please visit http://www.freebsd.org :-------------------------------------------------- : : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-hackers" in the body of the message : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message