lkml.org 
[lkml]   [2022]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] filelock: move file locking definitions to separate header file
From
Date
On Tue, 2022-11-22 at 03:51 +0000, Matthew Wilcox wrote:
> On Sun, Nov 20, 2022 at 03:59:57PM -0500, Jeff Layton wrote:
> > Move the file locking definitions to a new header file, and add the
> > appropriate #include directives to the source files that need them. By
> > doing this we trim down fs.h a bit and limit the amount of rebuilding
> > that has to be done when we make changes to the file locking APIs.
>
> I'm in favour of this in general, but I think there's a few implicit
> includes. Can you create a test.c that only #include
> <linnux/filelock.h> and see if there's anything missing?
>
> > + wait_queue_head_t fl_wait;
> > + struct file *fl_file;
>
> These two seem undefined at this point.
>
> > + struct fasync_struct * fl_fasync; /* for lease break notifications */
>
> Likewise.
>

Yeah, there is quite a bit missing. I think I'll have to add this at the
head of filelock.h:

#include <linux/fs.h>

...as we need several definitions from fs.h for this header.
--
Jeff Layton <jlayton@kernel.org>

\
 
 \ /
  Last update: 2022-11-22 12:17    [W:0.222 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site