lkml.org 
[lkml]   [2002]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] -- filesystems.c::sys_nfsservctl
Date
Ok guys get ready to flame me....  

The attached patch removes the lock/unlock in this function. Now I am 80%
sure of this one, but would like a word from the kmod maintainer about
whether request_module needs the BKL or not. do_nfsservctl already takes
the BKL inside the function so as long as request_module is safe this pair
can be removed -- effectively making do_nfsservctl responsible for it's own
locking scheme.

So whoever knows for SURE about request_module, please reply.

========NOT A PATCH --- filesystems.c::sys_nfsservctl================
long
asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp)
{
int ret = -ENOSYS;

lock_kernel();

if (nfsd_linkage ||
(request_module ("nfsd") == 0 && nfsd_linkage))
ret = nfsd_linkage->do_nfsservctl(cmd, argp, resp);

unlock_kernel();
return ret;
}


==================PATCH ATTACHED==========================
===== fs/filesystems.c 1.4 vs edited =====
--- 1.4/fs/filesystems.c Fri Feb 8 22:10:55 2002
+++ edited/fs/filesystems.c Wed Feb 13 15:30:20 2002
@@ -22,13 +22,11 @@
{
int ret = -ENOSYS;

- lock_kernel();

if (nfsd_linkage ||
(request_module ("nfsd") == 0 && nfsd_linkage))
ret = nfsd_linkage->do_nfsservctl(cmd, argp, resp);

- unlock_kernel();
return ret;
}
EXPORT_SYMBOL(nfsd_linkage);
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.077 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site