nfsfh.c (20c7775aecea04d8ca322039969d49dcf568e0e9) | nfsfh.c (daab110e47f8d7aa6da66923e3ac1a8dbd2b2a72) |
---|---|
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 --- 277 unchanged lines hidden (view full) --- 286 if (d_is_dir(dentry) && 287 (dentry->d_flags & DCACHE_DISCONNECTED)) { 288 printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %pd2\n", 289 dentry); 290 } 291 292 fhp->fh_dentry = dentry; 293 fhp->fh_export = exp; | 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 --- 277 unchanged lines hidden (view full) --- 286 if (d_is_dir(dentry) && 287 (dentry->d_flags & DCACHE_DISCONNECTED)) { 288 printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %pd2\n", 289 dentry); 290 } 291 292 fhp->fh_dentry = dentry; 293 fhp->fh_export = exp; |
294 295 switch (rqstp->rq_vers) { 296 case 3: 297 if (dentry->d_sb->s_export_op->flags & EXPORT_OP_NOWCC) 298 fhp->fh_no_wcc = true; 299 break; 300 case 2: 301 fhp->fh_no_wcc = true; 302 } 303 |
|
294 return 0; 295out: 296 exp_put(exp); 297 return error; 298} 299 300/** 301 * fh_verify - filehandle lookup and access checking --- 252 unchanged lines hidden (view full) --- 554 (inode ? inode->i_ino : 0)); 555 556 /* Choose filehandle version and fsid type based on 557 * the reference filehandle (if it is in the same export) 558 * or the export options. 559 */ 560 set_version_and_fsid_type(fhp, exp, ref_fh); 561 | 304 return 0; 305out: 306 exp_put(exp); 307 return error; 308} 309 310/** 311 * fh_verify - filehandle lookup and access checking --- 252 unchanged lines hidden (view full) --- 564 (inode ? inode->i_ino : 0)); 565 566 /* Choose filehandle version and fsid type based on 567 * the reference filehandle (if it is in the same export) 568 * or the export options. 569 */ 570 set_version_and_fsid_type(fhp, exp, ref_fh); 571 |
572 /* If we have a ref_fh, then copy the fh_no_wcc setting from it. */ 573 fhp->fh_no_wcc = ref_fh ? ref_fh->fh_no_wcc : false; 574 |
|
562 if (ref_fh == fhp) 563 fh_put(ref_fh); 564 565 if (fhp->fh_locked || fhp->fh_dentry) { 566 printk(KERN_ERR "fh_compose: fh %pd2 not initialized!\n", 567 dentry); 568 } 569 if (fhp->fh_maxsize < NFS_FHSIZE) --- 87 unchanged lines hidden (view full) --- 657 dput(dentry); 658 fh_clear_wcc(fhp); 659 } 660 fh_drop_write(fhp); 661 if (exp) { 662 exp_put(exp); 663 fhp->fh_export = NULL; 664 } | 575 if (ref_fh == fhp) 576 fh_put(ref_fh); 577 578 if (fhp->fh_locked || fhp->fh_dentry) { 579 printk(KERN_ERR "fh_compose: fh %pd2 not initialized!\n", 580 dentry); 581 } 582 if (fhp->fh_maxsize < NFS_FHSIZE) --- 87 unchanged lines hidden (view full) --- 670 dput(dentry); 671 fh_clear_wcc(fhp); 672 } 673 fh_drop_write(fhp); 674 if (exp) { 675 exp_put(exp); 676 fhp->fh_export = NULL; 677 } |
678 fhp->fh_no_wcc = false; |
|
665 return; 666} 667 668/* 669 * Shorthand for dprintk()'s 670 */ 671char * SVCFH_fmt(struct svc_fh *fhp) 672{ --- 41 unchanged lines hidden --- | 679 return; 680} 681 682/* 683 * Shorthand for dprintk()'s 684 */ 685char * SVCFH_fmt(struct svc_fh *fhp) 686{ --- 41 unchanged lines hidden --- |