diff options
| author | Jeff Layton <jlayton@kernel.org> | 2024-01-31 18:01:54 -0500 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-02-05 13:11:37 +0100 |
| commit | 64f92a554f72cbfe8b971f93af9d07f87599bc88 (patch) | |
| tree | 95af30446b99b001b28fa2a730cd41e4f5843f0b /fs/ocfs2/locks.c | |
| parent | 60f3154d196b5b1e3a819f0c1d4e6c94bcb73937 (diff) | |
| download | linux-64f92a554f72cbfe8b971f93af9d07f87599bc88.tar.gz linux-64f92a554f72cbfe8b971f93af9d07f87599bc88.tar.bz2 linux-64f92a554f72cbfe8b971f93af9d07f87599bc88.zip | |
ocfs2: convert to using new filelock helpers
Convert to using the new file locking helper functions.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20240131-flsplit-v3-13-c6129007ee8d@kernel.org
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ocfs2/locks.c')
| -rw-r--r-- | fs/ocfs2/locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c index f37174e79fad..ef4fd91b586e 100644 --- a/fs/ocfs2/locks.c +++ b/fs/ocfs2/locks.c @@ -27,7 +27,7 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode, struct ocfs2_file_private *fp = file->private_data; struct ocfs2_lock_res *lockres = &fp->fp_flock; - if (fl->fl_type == F_WRLCK) + if (lock_is_write(fl)) level = 1; if (!IS_SETLKW(cmd)) trylock = 1; @@ -107,7 +107,7 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) ocfs2_mount_local(osb)) return locks_lock_file_wait(file, fl); - if (fl->fl_type == F_UNLCK) + if (lock_is_unlock(fl)) return ocfs2_do_funlock(file, cmd, fl); else return ocfs2_do_flock(file, inode, cmd, fl); |
