~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/nfs_common/nfs_ssc.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * Helper for knfsd's SSC to access ops in NFS client modules
  4  *
  5  * Author: Dai Ngo <dai.ngo@oracle.com>
  6  *
  7  * Copyright (c) 2020, Oracle and/or its affiliates.
  8  */
  9 
 10 #include <linux/module.h>
 11 #include <linux/fs.h>
 12 #include <linux/nfs_ssc.h>
 13 #include "../nfs/nfs4_fs.h"
 14 
 15 
 16 struct nfs_ssc_client_ops_tbl nfs_ssc_client_tbl;
 17 EXPORT_SYMBOL_GPL(nfs_ssc_client_tbl);
 18 
 19 #ifdef CONFIG_NFS_V4_2
 20 /**
 21  * nfs42_ssc_register - install the NFS_V4 client ops in the nfs_ssc_client_tbl
 22  * @ops: NFS_V4 ops to be installed
 23  *
 24  * Return values:
 25  *   None
 26  */
 27 void nfs42_ssc_register(const struct nfs4_ssc_client_ops *ops)
 28 {
 29         nfs_ssc_client_tbl.ssc_nfs4_ops = ops;
 30 }
 31 EXPORT_SYMBOL_GPL(nfs42_ssc_register);
 32 
 33 /**
 34  * nfs42_ssc_unregister - uninstall the NFS_V4 client ops from
 35  *                              the nfs_ssc_client_tbl
 36  * @ops: ops to be uninstalled
 37  *
 38  * Return values:
 39  *   None
 40  */
 41 void nfs42_ssc_unregister(const struct nfs4_ssc_client_ops *ops)
 42 {
 43         if (nfs_ssc_client_tbl.ssc_nfs4_ops != ops)
 44                 return;
 45 
 46         nfs_ssc_client_tbl.ssc_nfs4_ops = NULL;
 47 }
 48 EXPORT_SYMBOL_GPL(nfs42_ssc_unregister);
 49 #endif /* CONFIG_NFS_V4_2 */
 50 
 51 #ifdef CONFIG_NFS_V4_2
 52 /**
 53  * nfs_ssc_register - install the NFS_FS client ops in the nfs_ssc_client_tbl
 54  * @ops: NFS_FS ops to be installed
 55  *
 56  * Return values:
 57  *   None
 58  */
 59 void nfs_ssc_register(const struct nfs_ssc_client_ops *ops)
 60 {
 61         nfs_ssc_client_tbl.ssc_nfs_ops = ops;
 62 }
 63 EXPORT_SYMBOL_GPL(nfs_ssc_register);
 64 
 65 /**
 66  * nfs_ssc_unregister - uninstall the NFS_FS client ops from
 67  *                              the nfs_ssc_client_tbl
 68  * @ops: ops to be uninstalled
 69  *
 70  * Return values:
 71  *   None
 72  */
 73 void nfs_ssc_unregister(const struct nfs_ssc_client_ops *ops)
 74 {
 75         if (nfs_ssc_client_tbl.ssc_nfs_ops != ops)
 76                 return;
 77         nfs_ssc_client_tbl.ssc_nfs_ops = NULL;
 78 }
 79 EXPORT_SYMBOL_GPL(nfs_ssc_unregister);
 80 
 81 #else
 82 void nfs_ssc_register(const struct nfs_ssc_client_ops *ops)
 83 {
 84 }
 85 EXPORT_SYMBOL_GPL(nfs_ssc_register);
 86 
 87 void nfs_ssc_unregister(const struct nfs_ssc_client_ops *ops)
 88 {
 89 }
 90 EXPORT_SYMBOL_GPL(nfs_ssc_unregister);
 91 #endif /* CONFIG_NFS_V4_2 */
 92 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php