summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4layouts.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-02-01 00:02:23 +0100
committerChristian Brauner <brauner@kernel.org>2024-02-05 13:11:43 +0100
commit05580bbfc6bcac93eae2c8a1bf9dc245b2934b28 (patch)
treefd7b6d54f19eff7df08a99be2be0bad2fa8ccd55 /fs/nfsd/nfs4layouts.c
parentnfs: adapt to breakup of struct file_lock (diff)
downloadlinux-05580bbfc6bcac93eae2c8a1bf9dc245b2934b28.tar.xz
linux-05580bbfc6bcac93eae2c8a1bf9dc245b2934b28.zip
nfsd: 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-42-c6129007ee8d@kernel.org Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfsd/nfs4layouts.c')
-rw-r--r--fs/nfsd/nfs4layouts.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c
index 5e8096bc5eaa..daae68e526e0 100644
--- a/fs/nfsd/nfs4layouts.c
+++ b/fs/nfsd/nfs4layouts.c
@@ -193,14 +193,15 @@ nfsd4_layout_setlease(struct nfs4_layout_stateid *ls)
return -ENOMEM;
locks_init_lock(fl);
fl->fl_lmops = &nfsd4_layouts_lm_ops;
- fl->fl_flags = FL_LAYOUT;
- fl->fl_type = F_RDLCK;
+ fl->c.flc_flags = FL_LAYOUT;
+ fl->c.flc_type = F_RDLCK;
fl->fl_end = OFFSET_MAX;
- fl->fl_owner = ls;
- fl->fl_pid = current->tgid;
- fl->fl_file = ls->ls_file->nf_file;
+ fl->c.flc_owner = ls;
+ fl->c.flc_pid = current->tgid;
+ fl->c.flc_file = ls->ls_file->nf_file;
- status = vfs_setlease(fl->fl_file, fl->fl_type, &fl, NULL);
+ status = vfs_setlease(fl->c.flc_file, fl->c.flc_type, &fl,
+ NULL);
if (status) {
locks_free_lock(fl);
return status;
@@ -731,7 +732,7 @@ nfsd4_layout_lm_break(struct file_lock *fl)
* in time:
*/
fl->fl_break_time = 0;
- nfsd4_recall_file_layout(fl->fl_owner);
+ nfsd4_recall_file_layout(fl->c.flc_owner);
return false;
}