CVS: intermezzo/fs24/linux intermezzo_fs.h,1.88,1.89
Chen Yang <[email protected]> Tue, 30 Sep 2003 08:51:54 -0700
| Newsgroups | gmane.comp.file-systems.intermezzo.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/intermezzo/intermezzo/fs24/linux In directory sc8-pr-cvs1:/tmp/cvs-serv25410/intermezzo/fs24/linux Modified Files: intermezzo_fs.h Log Message: Applied and tested Domen Puncer's patch to fs25/fs24 part code for list related processing Applied and tested Renaud Duhaut([email protected])'s patch to solve fs24's InterMezzo's SLAB allocator leakage problem, on 2.4 kernel, now it can insmod and run, then rmmod. Insmod again won't cause Oops any more. :-) Index: intermezzo_fs.h =================================================================== RCS file: /cvsroot/intermezzo/intermezzo/fs24/linux/intermezzo_fs.h,v retrieving revision 1.88 retrieving revision 1.89 diff -U2 -r1.88 -r1.89 --- intermezzo_fs.h 30 Apr 2002 02:17:50 -0000 1.88 +++ intermezzo_fs.h 30 Sep 2003 15:51:52 -0000 1.89 @@ -654,4 +654,5 @@ struct izo_rcvd_rec *lr_client, struct izo_rcvd_rec *lr_server); int izo_rep_cache_init(struct presto_file_set *); +void izo_rep_cache_clean(struct presto_file_set *fset); loff_t izo_rcvd_get(struct izo_rcvd_rec *, struct presto_file_set *, char *uuid); loff_t izo_rcvd_write(struct presto_file_set *, struct izo_rcvd_rec *); @@ -709,8 +710,15 @@ { char *tmp; - tmp = kmalloc(strlen(str) + 1, GFP_KERNEL); - if (tmp) - memcpy(tmp, str, strlen(str) + 1); - + long int s; + + s=strlen(str) + 1; + tmp = kmalloc(s, GFP_KERNEL); + if (tmp){ + memcpy(tmp, str, s); + presto_kmem_inc(tmp, s); + } + CDEBUG(D_MALLOC, "kmalloced: %ld at %p (tot %ld).\n", + s, tmp, presto_kmemory); + return tmp; } ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf