Whamcloud - gitweb
Correctly set lsm size for open replay.
[fs/lustre-release.git] / libcfs / libcfs / lwt.c
index 2f88a98..c8ca37b 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
 # define EXPORT_SYMTAB
 #endif
 
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/kernel.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <linux/interrupt.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
 #define DEBUG_SUBSYSTEM S_LNET
 
 #include <libcfs/libcfs.h>
@@ -86,7 +69,7 @@ lwt_lookup_string (int *size, char *knl_ptr,
          * trying to determine the string length, so we're trusting our
          * caller... */
 
-        if (!capable(CAP_SYS_ADMIN))
+        if (!cfs_capable(CFS_CAP_SYS_ADMIN))
                 return (-EPERM);
 
         if (user_size > 0 && 
@@ -117,7 +100,7 @@ lwt_control (int enable, int clear)
         int          i;
         int          j;
 
-        if (!capable(CAP_SYS_ADMIN))
+        if (!cfs_capable(CFS_CAP_SYS_ADMIN))
                 return (-EPERM);
 
         if (!enable) {
@@ -164,7 +147,7 @@ lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
         int          i;
         int          j;
 
-        if (!capable(CAP_SYS_ADMIN))
+        if (!cfs_capable(CFS_CAP_SYS_ADMIN))
                 return (-EPERM);
 
         *ncpu = num_online_cpus();