(file) Return to emlog.c CVS log (file) Jump to this file's LXR Page (dir) Up to [CENS] / misc / emlog

Diff for /misc/emlog/emlog.c between version 1.3 and 1.4

version 1.3, 2001/08/13 05:51:45 version 1.4, 2001/08/13 06:01:31
Line 23 
Line 23 
 #include <linux/delay.h> #include <linux/delay.h>
 #include <linux/errno.h> #include <linux/errno.h>
 #include <linux/malloc.h> #include <linux/malloc.h>
   #include <linux/vmalloc.h>
 #include <linux/types.h> #include <linux/types.h>
 #include <linux/fs.h> #include <linux/fs.h>
 #include <linux/poll.h> #include <linux/poll.h>
Line 75 
Line 76 
  
   /* figure out how much of a buffer this should be and allocate the buffer */   /* figure out how much of a buffer this should be and allocate the buffer */
   einfo->size = 1024 * minor;   einfo->size = 1024 * minor;
   if ((einfo->data = kmalloc(sizeof(char)*einfo->size, GFP_KERNEL))==NULL)    if ((einfo->data = (char *) vmalloc(sizeof(char) * einfo->size)) == NULL)
     goto data_malloc_failed;     goto data_malloc_failed;
  
   /* init the rest of the structure */   /* init the rest of the structure */
Line 102 
Line 103 
   return 0;   return 0;
  
  other_failure: /* if we check for other errors later, jump here */  other_failure: /* if we check for other errors later, jump here */
   kfree(einfo->data);    vfree(einfo->data);
  data_malloc_failed:  data_malloc_failed:
   kfree(einfo);   kfree(einfo);
  struct_malloc_failed:  struct_malloc_failed:
Line 125 
Line 126 
   if (emlog_debug)   if (emlog_debug)
     printk("freeing resources associated with inode %d\n", einfo->i_ino);     printk("freeing resources associated with inode %d\n", einfo->i_ino);
  
   kfree(einfo->data);    vfree(einfo->data);
  
   /* now delete the 'einfo' structure from the linked list.  'ptr' is   /* now delete the 'einfo' structure from the linked list.  'ptr' is
    * the pointer that needs to be changed... which is either the list    * the pointer that needs to be changed... which is either the list


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

CENS CVS Mailing List
Powered by
ViewCVS 0.9.2