diff options
author | Jeff Layton <jlayton@kernel.org> | 2024-02-01 00:02:24 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-05 13:11:43 +0100 |
commit | c8df2cc9d63bdb365c520a2dd5472f7b7755644f (patch) | |
tree | a35b32042441da476569094e89e081116bcb06cf /fs/ocfs2 | |
parent | nfsd: adapt to breakup of struct file_lock (diff) | |
download | linux-c8df2cc9d63bdb365c520a2dd5472f7b7755644f.tar.xz linux-c8df2cc9d63bdb365c520a2dd5472f7b7755644f.zip |
ocfs2: 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-43-c6129007ee8d@kernel.org
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/locks.c | 9 | ||||
-rw-r--r-- | fs/ocfs2/stack_user.c | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c index 84ad403b5998..6de944818c56 100644 --- a/fs/ocfs2/locks.c +++ b/fs/ocfs2/locks.c @@ -8,7 +8,6 @@ */ #include <linux/fs.h> -#define _NEED_FILE_LOCK_FIELD_MACROS #include <linux/filelock.h> #include <linux/fcntl.h> @@ -54,8 +53,8 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode, */ locks_init_lock(&request); - request.fl_type = F_UNLCK; - request.fl_flags = FL_FLOCK; + request.c.flc_type = F_UNLCK; + request.c.flc_flags = FL_FLOCK; locks_lock_file_wait(file, &request); ocfs2_file_unlock(file); @@ -101,7 +100,7 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) struct inode *inode = file->f_mapping->host; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if (!(fl->fl_flags & FL_FLOCK)) + if (!(fl->c.flc_flags & FL_FLOCK)) return -ENOLCK; if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) || @@ -119,7 +118,7 @@ int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) struct inode *inode = file->f_mapping->host; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if (!(fl->fl_flags & FL_POSIX)) + if (!(fl->c.flc_flags & FL_POSIX)) return -ENOLCK; return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl); diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 39b7e47a8618..c11406cd87a8 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c @@ -9,7 +9,6 @@ #include <linux/module.h> #include <linux/fs.h> -#define _NEED_FILE_LOCK_FIELD_MACROS #include <linux/filelock.h> #include <linux/miscdevice.h> #include <linux/mutex.h> |