lkml.org 
[lkml]   [2009]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] Remove fasync() BKL usage, take 3325
On Wed, Jan 28, 2009 at 12:36:18PM -0500, Christoph Hellwig wrote:
> On Wed, Jan 28, 2009 at 04:14:39AM +0100, Oleg Nesterov wrote:
> > I didn't send the actual patch. The idea is,
> >
> > can't we use O_LOCK_FLAGS bit? I agree, it is a bit ugly,
> > and I won't insist if you don't like is.
> >
> > static inline int try_lock_f_flags(struct file *file)
> > {
> > return !test_and_set_bit(O_LOCK_FLAGS, file->f_flags);
> > }
>
> ->f_flags is an unsigned int and the bit macros need an unsigned long.
> Increasing the size of struct file for this is probably a bad idea.


I think very few architectures actually need the unsigned long.

For 2.4 I had a hack (when it did still matter for struct page)
to define a new type for this that denoted the minimal type size
needed here.

That could be reintroduced. Then only the few archs which really
require unsigned long here would pay the overhead.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2009-01-29 15:25    [W:0.678 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site