X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-file.c;h=be31f16194b17234e0c3c5756b1567dc1aca5ca0;hb=038a577ce9dbd92a18a7a475fd82cf103be378b1;hp=5489764f4889c026ff6293ffb746978f6b15fc2a;hpb=21e93d7fc021590c20ab5fecef03374e008d15e9;p=palacios.git diff --git a/linux_module/iface-file.c b/linux_module/iface-file.c index 5489764..be31f16 100644 --- a/linux_module/iface-file.c +++ b/linux_module/iface-file.c @@ -106,7 +106,7 @@ static int mkdir_recursive(const char * path, unsigned short perms) { static int palacios_file_mkdir(const char * pathname, unsigned short perms, int recurse) { /* Welcome to the jungle... */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,41) /* DO NOT REFERENCE THIS VARIABLE */ /* It only exists to provide version compatibility */ struct path tmp_path; @@ -123,12 +123,12 @@ static int palacios_file_mkdir(const char * pathname, unsigned short perms, int } /* Before Linux 3.1 this was somewhat more difficult */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,41) { struct nameidata nd; // I'm not 100% sure about the version here, but it was around this time that the API changed -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37) ret = kern_path_parent(pathname, &nd); #else @@ -344,6 +344,7 @@ static int guest_file_init(struct v3_guest * guest, void ** vm_data) { static int guest_file_deinit(struct v3_guest * guest, void * vm_data) { + kfree(vm_data); return 0; }