summaryrefslogtreecommitdiffstats
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-06-22 20:45:23 +0200
committerDavid Teigland <teigland@redhat.com>2022-08-01 16:31:38 +0200
commit6b0afc0cc3e9a9a91f5a76d0965d449781441e18 (patch)
tree53c866fc67bbaec980320412519ebac8bdc9d060 /fs/dlm/user.c
parentfs: dlm: add deprecation Kconfig and warnings for timeouts (diff)
downloadlinux-6b0afc0cc3e9a9a91f5a76d0965d449781441e18.tar.xz
linux-6b0afc0cc3e9a9a91f5a76d0965d449781441e18.zip
fs: dlm: don't use deprecated timeout features by default
This patch will disable use of deprecated timeout features if CONFIG_DLM_DEPRECATED_API is not set. The deprecated features will be removed in upcoming kernel release v6.2. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/dlm/user.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 32452d7a466c..99e8f0744513 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -270,10 +270,16 @@ static int device_user_lock(struct dlm_user_proc *proc,
ua->xid = params->xid;
if (params->flags & DLM_LKF_CONVERT) {
+#ifdef CONFIG_DLM_DEPRECATED_API
error = dlm_user_convert(ls, ua,
params->mode, params->flags,
params->lkid, params->lvb,
(unsigned long) params->timeout);
+#else
+ error = dlm_user_convert(ls, ua,
+ params->mode, params->flags,
+ params->lkid, params->lvb);
+#endif
} else if (params->flags & DLM_LKF_ORPHAN) {
error = dlm_user_adopt_orphan(ls, ua,
params->mode, params->flags,
@@ -282,10 +288,16 @@ static int device_user_lock(struct dlm_user_proc *proc,
if (!error)
error = lkid;
} else {
+#ifdef CONFIG_DLM_DEPRECATED_API
error = dlm_user_request(ls, ua,
params->mode, params->flags,
params->name, params->namelen,
(unsigned long) params->timeout);
+#else
+ error = dlm_user_request(ls, ua,
+ params->mode, params->flags,
+ params->name, params->namelen);
+#endif
if (!error)
error = ua->lksb.sb_lkid;
}