[linux-cifs-client] Backporting cifs 1.50 to an old kernel (2.6.11)

Jeff Layton jlayton at poochiereds.net
Tue Feb 5 18:08:35 GMT 2008


On Tue, 05 Feb 2008 15:59:24 +0000
Seb James <seb at esfnet.co.uk> wrote:

> On Tue, 2008-02-05 at 15:39 +0000, Seb James wrote:
> > I downloaded cifs 1.50 and want to try backporting it to the rather
> > ancient kernel 2.6.11.
> > 
> > First problem:
> > 
> > What to do about the mutexes in fs/cifs/file.c? For example in file.c
> > line 877. This is new code compared with fs/cifs/file.c in kernel
> > 2.6.11. file.c (and the rest of cifs) actually compiles if all the
> > mutex_lock() and mutex_unlock() functions are commented out and I see
> > there are several other locations in the code which deal with testing
> > for particular kernel versions.
> > 
> > What to replace them with? Semaphores? What would the equivalent
> > function call be for kernels < 2.6.17 (which I think is the version to
> > which Ingo Molnar's mutex code was added)?
> 
> Ok, I just replaced mutex_lock() with down() if kernel version is <
> 2.6.17 and and mutex_unlock() with up(), but without considering what
> the implications of this change would be. With the attached patch
> applied, cifs 1.50 compiles and links on kernel 2.6.11. Whether or not
> it will work is another matter of course.
> 
> Seb James.

I posted a patchset a month ago or so that contains some patches that I
needed to make that work with a 2.6.9 based kernel. See this email on
this list:

      Subject: [linux-cifs-client] a few patches for backported kernel
tarballs...

...they may be helpful.

-- 
Jeff Layton <jlayton at poochiereds.net>


More information about the linux-cifs-client mailing list