linux-old/fs/filesystems.c
<<
>>
Prefs
   1/*
   2 *  linux/fs/filesystems.c
   3 *
   4 *  Copyright (C) 1991, 1992  Linus Torvalds
   5 *
   6 *  nfsservctl system-call when nfsd is not compiled in.
   7 */
   8
   9#include <linux/config.h>
  10#include <linux/module.h>
  11#include <linux/sched.h>
  12#include <linux/smp_lock.h>
  13#include <linux/kmod.h>
  14#include <linux/nfsd/interface.h>
  15
  16#if ! defined(CONFIG_NFSD)
  17struct nfsd_linkage *nfsd_linkage;
  18
  19long
  20asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp)
  21{
  22        int ret = -ENOSYS;
  23        
  24#if defined(CONFIG_MODULES)
  25        lock_kernel();
  26
  27        if (nfsd_linkage ||
  28            (request_module ("nfsd") == 0 && nfsd_linkage)) {
  29                __MOD_INC_USE_COUNT(nfsd_linkage->owner);
  30                unlock_kernel();
  31                ret = nfsd_linkage->do_nfsservctl(cmd, argp, resp);
  32                __MOD_DEC_USE_COUNT(nfsd_linkage->owner);
  33        } else
  34                unlock_kernel();
  35#endif
  36        return ret;
  37}
  38EXPORT_SYMBOL(nfsd_linkage);
  39
  40#endif /* CONFIG_NFSD */
  41
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.