summaryrefslogtreecommitdiff
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-02-01 02:01:52 +0300
committerChristian Brauner <brauner@kernel.org>2024-02-05 15:11:36 +0300
commitd7c9616be0759c1cfb44a68ba838548d22b98484 (patch)
tree3a265887c3767eec2a535133142b170a65d148ad /fs/nfs/file.c
parent872584f1bb983a688547509141b03b37bdb28840 (diff)
downloadlinux-d7c9616be0759c1cfb44a68ba838548d22b98484.tar.xz
nfs: convert to using new filelock helpers
Convert to using the new file locking helper functions. Also, in later patches we're going to introduce some temporary macros with names that clash with the variable name in nfs4_proc_unlck. Rename it. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20240131-flsplit-v3-11-c6129007ee8d@kernel.org Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 8577ccf621f5..1a7a76d6055b 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -851,7 +851,7 @@ int nfs_lock(struct file *filp, int cmd, struct file_lock *fl)
if (IS_GETLK(cmd))
ret = do_getlk(filp, cmd, fl, is_local);
- else if (fl->fl_type == F_UNLCK)
+ else if (lock_is_unlock(fl))
ret = do_unlk(filp, cmd, fl, is_local);
else
ret = do_setlk(filp, cmd, fl, is_local);
@@ -878,7 +878,7 @@ int nfs_flock(struct file *filp, int cmd, struct file_lock *fl)
is_local = 1;
/* We're simulating flock() locks using posix locks on the server */
- if (fl->fl_type == F_UNLCK)
+ if (lock_is_unlock(fl))
return do_unlk(filp, cmd, fl, is_local);
return do_setlk(filp, cmd, fl, is_local);
}