[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241014110304.60746-1-qianqiang.liu@163.com>
Date: Mon, 14 Oct 2024 19:03:04 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: brauner@...nel.org
Cc: ceph-devel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] ceph: return result directly from wait_for_completion_killable()
Simplify the code by returning the result of
wait_for_completion_killable() directly, instead of calling it
separately and then returning 0.
No functional changes are introduced, this is a simple refactor
to streamline the code.
Signed-off-by: Qianqiang Liu <qianqiang.liu@....com>
---
fs/ceph/locks.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c
index ebf4ac0055dd..0d48a85f5397 100644
--- a/fs/ceph/locks.c
+++ b/fs/ceph/locks.c
@@ -221,8 +221,7 @@ static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc,
if (err && err != -ERESTARTSYS)
return err;
- wait_for_completion_killable(&req->r_safe_completion);
- return 0;
+ return wait_for_completion_killable(&req->r_safe_completion);
}
static int try_unlock_file(struct file *file, struct file_lock *fl)
--
2.39.2 (Apple Git-143)
Powered by blists - more mailing lists