Re: [PATCH] putting old-style lock handling back into 2.2.10

david parsons (o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s)
5 Jul 1999 17:03:49 -0700


In article <linux.kernel.19990705172800.E5601@pcep-jamie.cern.ch>,
Jamie Lokier <lkd@tantalophile.demon.co.uk> wrote:
>david parsons wrote:
>> I noticed (when it made one of my test machines blow up and die) that
>> 2.2 doesn't support the old-style F_EXLCK locking anymore. This little
>> patch (against 2.2.10) puts that locking back, so that people using a.out
>> gdbm programs won't have them blow up on them.
>
>> + case F_EXLCK :
>> + fl->fl_type = F_WRLCK;
>> + /*fl->fl_flags |= F_BROKEN;*/
>
>Does the F_BROKEN comment imply that the F_EXLCK behaviour is not quite
>correct with your patch?

Well, when I looked through 2.0.x, all F_BROKEN was used for was for
displaying BROKEN in /proc/locks. I can certainly add that behavior
back for 2.2.10, but having gdbm fail was a somewhat more important
problem.

>In which case, surely it is better for the kernel to return an error
>code than to implement the wrong kind of locking?

No. It's better for the kernel to try to keep the published
interfaces working, so that you don't have to replace user code
when you upgrade kernels.

Networking is still broken in 2.2.x, of course (the stupid automatic
route stuff and 0.0.0.0 not working, which breaks dhcp), and ptys no
longer use major 4 (which can be fixed by building with devfs, which
is the correct interface change, so I'm not going to worry about it),
but this patch means that any of my Mastodon systems can have a 2.2
kernel upgrade and not blow up during system startup.

____
david parsons \bi/ a lot of userland breaks, too, but those can be
\/ fixed without poking at kernel interfaces.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/