lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] filelock: move file locking definitions to separate header file
On Sun, Nov 20, 2022 at 03:59:57PM -0500, Jeff Layton wrote:

> --- /dev/null
> +++ b/include/linux/filelock.h
> @@ -0,0 +1,428 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_FILELOCK_H
> +#define _LINUX_FILELOCK_H
> +
> +#include <linux/list.h>
> +#include <linux/nfs_fs_i.h>

Umm... I'd add a comment along the lines of "struct file_lock has
a BS union by fs type; NFS side of things needs nfs_fs_i.h"

> +struct lock_manager_operations {
> + void *lm_mod_owner;
> + fl_owner_t (*lm_get_owner)(fl_owner_t);

Probably take fl_owner_t to some more neutral header...

> +#define locks_inode(f) file_inode(f)

Why do we still have that one, anyway? Separate patch, obviously,
but I would take Occam's Razor to that entity...

> +struct files_struct;
> +extern void show_fd_locks(struct seq_file *f,
> + struct file *filp, struct files_struct *files);

If anything, that would be better off as fl_owner_t... Again, a separate
patch.

\
 
 \ /
  Last update: 2022-11-25 04:49    [W:0.186 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site