nfs_clnode.c (c6ba06d86c86901a3319272ade8476d249ec184b) | nfs_clnode.c (8f226f4c23e6fd158ad8f3c26be8d185cc0b73a2) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Rick Macklem at The University of Guelph. --- 272 unchanged lines hidden (view full) --- 281 * Reclaim an nfsnode so that it can be used for other purposes. 282 */ 283int 284ncl_reclaim(struct vop_reclaim_args *ap) 285{ 286 struct vnode *vp = ap->a_vp; 287 struct nfsnode *np = VTONFS(vp); 288 struct nfsdmap *dp, *dp2; | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Rick Macklem at The University of Guelph. --- 272 unchanged lines hidden (view full) --- 281 * Reclaim an nfsnode so that it can be used for other purposes. 282 */ 283int 284ncl_reclaim(struct vop_reclaim_args *ap) 285{ 286 struct vnode *vp = ap->a_vp; 287 struct nfsnode *np = VTONFS(vp); 288 struct nfsdmap *dp, *dp2; |
289 struct thread *td; |
|
289 | 290 |
291 td = curthread; 292 |
|
290 /* 291 * If the NLM is running, give it a chance to abort pending 292 * locks. 293 */ 294 if (nfs_reclaim_p != NULL) 295 nfs_reclaim_p(ap); 296 297 NFSLOCKNODE(np); | 293 /* 294 * If the NLM is running, give it a chance to abort pending 295 * locks. 296 */ 297 if (nfs_reclaim_p != NULL) 298 nfs_reclaim_p(ap); 299 300 NFSLOCKNODE(np); |
298 ncl_releasesillyrename(vp, ap->a_td); | 301 ncl_releasesillyrename(vp, td); |
299 NFSUNLOCKNODE(np); 300 301 if (NFS_ISV4(vp) && vp->v_type == VREG) 302 /* 303 * We can now safely close any remaining NFSv4 Opens for 304 * this file. Most opens will have already been closed by 305 * ncl_inactive(), but there are cases where it is not 306 * called, so we need to do it again here. 307 */ | 302 NFSUNLOCKNODE(np); 303 304 if (NFS_ISV4(vp) && vp->v_type == VREG) 305 /* 306 * We can now safely close any remaining NFSv4 Opens for 307 * this file. Most opens will have already been closed by 308 * ncl_inactive(), but there are cases where it is not 309 * called, so we need to do it again here. 310 */ |
308 (void) nfsrpc_close(vp, 1, ap->a_td); | 311 (void) nfsrpc_close(vp, 1, td); |
309 310 vfs_hash_remove(vp); 311 312 /* 313 * Call nfscl_reclaimnode() to save attributes in the delegation, 314 * as required. 315 */ 316 if (vp->v_type == VREG) --- 44 unchanged lines hidden --- | 312 313 vfs_hash_remove(vp); 314 315 /* 316 * Call nfscl_reclaimnode() to save attributes in the delegation, 317 * as required. 318 */ 319 if (vp->v_type == VREG) --- 44 unchanged lines hidden --- |