[Unionfs] Unionfs 2.0 on 2.6.9 kernel
Erez Zadok
ezk at cs.sunysb.edu
Tue Aug 7 10:57:04 EDT 2007
In message <46B831FC.1080405 at psi.ch>, Beyerle Urs writes:
> Hi,
>
> I tried unionfs 2.0 on 2.6.9 Redhat Enterprise Kernel
> (2.6.9-55.0.2.EL). Compiling is no problem after commenting out "static
> inline int atomic_inc_return(atomic_t *v)" in fs/unionfs/compat.h. Loading
> the module also works. But when I try to mount unionfs, for example with
>
> # mount -t unionfs -o dirs=/dir1=rw:/dir2=ro none /mnt/unionfs
>
> I get
> mount: Cannot allocate memory
[...]
Urs, try this small fix. This seems to fix a similar problem for someone
else, but I've not yet released this small fix. Let me know if it works for
you.
Thanks,
Erez.
diff --git a/fs/unionfs/compat.c b/fs/unionfs/compat.c
index 0135e2e..ea0443e 100644
--- a/fs/unionfs/compat.c
+++ b/fs/unionfs/compat.c
@@ -40,10 +40,6 @@ void *krealloc2(size_t oldsize, void *ptr, size_t newsize, int flags)
void *newptr; /* pointer of new buffer */
int numtocopy; /* number of bytes copied into new buffer */
- /* check entry conditions */
- if (oldsize < 1 || newsize < 1)
- return NULL;
-
/*
* optimization (OPTIONAL): if oldsize is same as newsize, and ptr is not
* NULL, then there's not need to realloc/malloc.
More information about the unionfs
mailing list