diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-01-31 18:02:22 -0500 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-05 13:11:43 +0100 |
commit | dd1fac6ae648cac4e92ccc829e94750ddfed5e52 (patch) | |
tree | 3e03ca8e31722cfdc3d555ffd659c904459d82cf /fs/nfs/write.c | |
parent | eb8ed7c6ab08cde2e8869adc72cc02c7368f0a21 (diff) |
nfs: adapt to breakup of struct file_lock
Most of the existing APIs have remained the same, but subsystems that
access file_lock fields directly need to reach into struct
file_lock_core now.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20240131-flsplit-v3-41-c6129007ee8d@kernel.org
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 13f2e10167ac..84bb85264572 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -25,7 +25,6 @@ #include <linux/freezer.h> #include <linux/wait.h> #include <linux/iversion.h> -#define _NEED_FILE_LOCK_FIELD_MACROS #include <linux/filelock.h> #include <linux/uaccess.h> @@ -1336,12 +1335,12 @@ static int nfs_can_extend_write(struct file *file, struct folio *folio, spin_lock(&flctx->flc_lock); if (!list_empty(&flctx->flc_posix)) { fl = list_first_entry(&flctx->flc_posix, struct file_lock, - fl_list); + c.flc_list); if (is_whole_file_wrlock(fl)) ret = 1; } else if (!list_empty(&flctx->flc_flock)) { fl = list_first_entry(&flctx->flc_flock, struct file_lock, - fl_list); + c.flc_list); if (lock_is_write(fl)) ret = 1; } |