[OpenAFS-devel] 1.4.2-beta2 fails to build on 2.4 kernel (FC1)

Derek Atkins warlord@MIT.EDU
Wed, 12 Jul 2006 18:22:53 -0400


Chaskiel M Grundman <cg2v@andrew.cmu.edu> writes:

> oops. The missing value is "wait" ('should posix_lock_file block', which is 
> the same thing that FL_SLEEP does on 2.6)

Ahh, okay...  Thanks!   But...

> --- osi_vnodeops.c      13 Jun 2006 16:00:38 -0000      1.81.2.41
> +++ osi_vnodeops.c      12 Jul 2006 16:26:03 -0000
> @@ -465,12 +465,14 @@
>
> #ifdef AFS_LINUX24_ENV
>     if (code == 0 && (cmd == F_SETLK || cmd == F_SETLKW)) {
> +#ifdef AFS_LINUX26_ENV
>        struct file_lock flp2;
>        flp2 = *flp;
> -#ifdef AFS_LINUX26_ENV
>        flp2.fl_flags &=~ FL_SLEEP;
> +       code = posix_lock_file(fp, &flp2);
> +#else
> +       code = posix_lock_file(fp, &flp, 0);

... this particular change is wrong.  It needs to be "flp" and not
"&flp"...  But with that adjustment to this proposed patch it does
seem to fix the build issue on 2.4, thanks.

Do you want me to mail the corrected patch to -bugs or can you
commit it as-is with the one-character change?

> #endif
> -       code = posix_lock_file(fp, &flp2);
>        osi_Assert(code != -EAGAIN); /* there should be no conflicts */
>        if (code) {
>            struct AFS_FLOCK flock2;

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available