2006-08-08 05:39:47

by Beschorner Daniel

[permalink] [raw]
Subject: fctnl(F_SETSIG) no longer works in 2.6.17, does in 2.6.16.

>>> static void lease_release_private_callback(struct file_lock *fl)
>>> {
>>> if (!fl->fl_file)
>>> return;
>>> f_delown(fl->fl_file);
>>> => fl->fl_file->f_owner.signum = 0;
>>> }

>> Why should the lease cleanup code be resetting f_owner.signum? That
>> looks wrong.
>> Stephen, I think this line of code predates the CITI changes. Do you
>> know who added it and why?

>Because when the original code was written, it was only called when we
got
>a fcntl(F_SETLEASE, F_UNLCK) call. The code got moved incorrectly and
>noone noticed.

Does somebody have a patch for this issue? It breaks one important
application (Samba) in its default configuration.

Daniel


2006-08-08 13:26:55

by Trond Myklebust

[permalink] [raw]
Subject: Re: fctnl(F_SETSIG) no longer works in 2.6.17, does in 2.6.16.

On Tue, 2006-08-08 at 07:38 +0200, Beschorner Daniel wrote:
> >>> static void lease_release_private_callback(struct file_lock *fl)
> >>> {
> >>> if (!fl->fl_file)
> >>> return;
> >>> f_delown(fl->fl_file);
> >>> => fl->fl_file->f_owner.signum = 0;
> >>> }
>
> >> Why should the lease cleanup code be resetting f_owner.signum? That
> >> looks wrong.
> >> Stephen, I think this line of code predates the CITI changes. Do you
> >> know who added it and why?
>
> >Because when the original code was written, it was only called when we
> got
> >a fcntl(F_SETLEASE, F_UNLCK) call. The code got moved incorrectly and
> >noone noticed.
>
> Does somebody have a patch for this issue? It breaks one important
> application (Samba) in its default configuration.
>
> Daniel

I believe this ought to fix it.

Cheers,
Trond


Attachments:
linux-2.6.18-fix_lease_signals.dif (1.21 kB)

2006-08-09 08:40:01

by Beschorner Daniel

[permalink] [raw]
Subject: Re: fctnl(F_SETSIG) no longer works in 2.6.17, does in 2.6.16.

> I believe this ought to fix it.
>
> Cheers,
> Trond

Thanks, the Samba problems are gone with this patch.
Maybe a 2.6.17.x candidate?

Daniel