nfsfh.c (19d008b46941b8c668402170522e0f7a9258409c) | nfsfh.c (dd8dd403d7b223cc77ee89d8d09caf045e90e648) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * NFS server file handle treatment. 4 * 5 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 6 * Portions Copyright (C) 1999 G. Allen Morris III <gam3@acm.org> 7 * Extensive rewrite by Neil Brown <neilb@cse.unsw.edu.au> Southern-Spring 1999 8 * ... and again Southern-Winter 2001 to support export_operations --- 535 unchanged lines hidden (view full) --- 544 set_version_and_fsid_type(fhp, exp, ref_fh); 545 546 /* If we have a ref_fh, then copy the fh_no_wcc setting from it. */ 547 fhp->fh_no_wcc = ref_fh ? ref_fh->fh_no_wcc : false; 548 549 if (ref_fh == fhp) 550 fh_put(ref_fh); 551 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * NFS server file handle treatment. 4 * 5 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 6 * Portions Copyright (C) 1999 G. Allen Morris III <gam3@acm.org> 7 * Extensive rewrite by Neil Brown <neilb@cse.unsw.edu.au> Southern-Spring 1999 8 * ... and again Southern-Winter 2001 to support export_operations --- 535 unchanged lines hidden (view full) --- 544 set_version_and_fsid_type(fhp, exp, ref_fh); 545 546 /* If we have a ref_fh, then copy the fh_no_wcc setting from it. */ 547 fhp->fh_no_wcc = ref_fh ? ref_fh->fh_no_wcc : false; 548 549 if (ref_fh == fhp) 550 fh_put(ref_fh); 551 |
552 if (fhp->fh_locked || fhp->fh_dentry) { | 552 if (fhp->fh_dentry) { |
553 printk(KERN_ERR "fh_compose: fh %pd2 not initialized!\n", 554 dentry); 555 } 556 if (fhp->fh_maxsize < NFS_FHSIZE) 557 printk(KERN_ERR "fh_compose: called with maxsize %d! %pd2\n", 558 fhp->fh_maxsize, 559 dentry); 560 --- 134 unchanged lines hidden (view full) --- 695 * Release a file handle. 696 */ 697void 698fh_put(struct svc_fh *fhp) 699{ 700 struct dentry * dentry = fhp->fh_dentry; 701 struct svc_export * exp = fhp->fh_export; 702 if (dentry) { | 553 printk(KERN_ERR "fh_compose: fh %pd2 not initialized!\n", 554 dentry); 555 } 556 if (fhp->fh_maxsize < NFS_FHSIZE) 557 printk(KERN_ERR "fh_compose: called with maxsize %d! %pd2\n", 558 fhp->fh_maxsize, 559 dentry); 560 --- 134 unchanged lines hidden (view full) --- 695 * Release a file handle. 696 */ 697void 698fh_put(struct svc_fh *fhp) 699{ 700 struct dentry * dentry = fhp->fh_dentry; 701 struct svc_export * exp = fhp->fh_export; 702 if (dentry) { |
703 fh_unlock(fhp); | |
704 fhp->fh_dentry = NULL; 705 dput(dentry); 706 fh_clear_pre_post_attrs(fhp); 707 } 708 fh_drop_write(fhp); 709 if (exp) { 710 exp_put(exp); 711 fhp->fh_export = NULL; --- 46 unchanged lines hidden --- | 703 fhp->fh_dentry = NULL; 704 dput(dentry); 705 fh_clear_pre_post_attrs(fhp); 706 } 707 fh_drop_write(fhp); 708 if (exp) { 709 exp_put(exp); 710 fhp->fh_export = NULL; --- 46 unchanged lines hidden --- |