[linux-cifs-client] Re: Re: compile cifs-1.48a error on CentOS 4.3

Akemi Yagi amyagi at gmail.com
Tue Jul 10 05:16:14 GMT 2007


On Tue, 10 Jul 2007 08:19:06 +0700, kemas wrote:

> Hi Akemi,
> 
> sorry for late reply, been out of office for 2 days. Yup, I've download
> cifs-1.48a from
> http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.48a.tar.gz, but when I
> compile the kernel it throws error like this
> 
> CC [M]  fs/cifs/cifsfs.o
> In file included from fs/cifs/cifsfs.c:40: fs/cifs/cifsproto.h:369: error:
> conflicting types for 'kzalloc' include/linux/slab.h:101: error: previous
> declaration of'kzalloc' was here
> fs/cifs/cifsproto.h:369: error: conflicting types for 'kzalloc'
> include/linux/slab.h:101: error: previous declaration of'kzalloc' was here
>    make[2]: *** [fs/cifs/cifsfs.o] Error 1 make[1]: *** [fs/cifs] Error 2
> make: *** [fs] Error 2
> 
> I'm so curious to test Jeff Layton patch that you told me last night (not
> sleeping and bouncing my head), but when I apply the patch to my kernel
> (kernel source from 2.6.9 from Centos), some patch were rejected, maybe
> because my fault not applying the patch correctly.
> 
> what I did last night like this, correct me if I'm wrong
> 
> #tar xvzf cifs-1.48a.tar.gz
> #cp cifs-bld-tmp/fs/cifs/* /usr/src/linux/fs/cifs #make mrproper
> #make oldconfig
> #patch -p1 < 0010-BZ-239939-Update-CIFS-to-1.48aRH.patch ...several files
> rejected
> #make
> ...still the same error
> 
> but when I change 2 files (cifsproto.h and cifsfs.c) that had declaration
> 'kzalloc' like Jeff Layton patch, and 1 file (inode.c) that has variable
> 'rlim', the compile process is running now.
> 
> Don't know if the module going to work because some code were alter like
> that. Or perhaps someone has nicer way to do this?

Hi kemas,

I think that your procedure is correct.  However, Layton's patches were
created against "the latest RHEL4 development kernel builds".  Therefore,
they may or may not be applied to the CentOS kernel source.  Do you really
want to compile cifs?  You would not like to install the whole kernel from
Layton's directory?

I have taken a "lazy" route.  I installed his src.rpm and recompiled the
cifs module by running:

make M=fs/cifs

( see http://wiki.centos.org/HowTos/BuildingKernelModules for details )

Then I installed the cifs.ko into the running kernel and confirmed that it
fixed the kernel crash bug in the 2.6.18 kernel (mine is CentOS 5).

Hope this helps,

Akemi





More information about the linux-cifs-client mailing list