[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Enable the ProcFS part of grant table only when CONFIG_PROC_FS is defined.



ChangeSet 1.1354, 2005/04/21 13:07:43+01:00, bren@xxxxxxxxxxxxxxxxxxxxxxx

        Enable the ProcFS part of grant table only when CONFIG_PROC_FS is 
defined.
        This is also necessary for separate driver domains that contain block
        device backend driver and operate in kernel-mode only (thus ProcFS 
turned off).
        
        Signed-off-by: Bin Ren <bin.ren@xxxxxxxxxxxx>



 gnttab.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c  2005-04-21 21:04:04 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c  2005-04-21 21:04:04 
-04:00
@@ -53,10 +53,6 @@
 
 static grant_entry_t *shared;
 
-/* /proc/xen/grant */
-static struct proc_dir_entry *grant_pde;
-
-
 /*
  * Lock-free grant-entry allocator
  */
@@ -243,6 +239,14 @@
     *private_head = release;
 }
 
+/*
+ * ProcFS operations
+ */
+
+#ifdef CONFIG_PROC_FS
+
+static struct proc_dir_entry *grant_pde;
+
 static int grant_ioctl(struct inode *inode, struct file *file,
                        unsigned int cmd, unsigned long data)
 {
@@ -319,6 +323,7 @@
     return -ENOSYS;
 }
 
+#endif /* CONFIG_PROC_FS */
 
 int gnttab_resume(void)
 {
@@ -360,6 +365,7 @@
     for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
         gnttab_free_list[i] = i + 1;
     
+#ifdef CONFIG_PROC_FS
     /*
      *  /proc/xen/grant : used by libxc to access grant tables
      */
@@ -376,6 +382,7 @@
 
     grant_pde->read_proc  = &grant_read;
     grant_pde->write_proc = &grant_write;
+#endif
 
     printk("Grant table initialized\n");
     return 0;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.