Commit 990d86bd authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman

staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock()

This arg is used to return an error code, but the returned code is never
looked at.  So there is no point returning it.
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f88faec4
...@@ -122,8 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) ...@@ -122,8 +122,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
* is released. * is released.
* *
*/ */
static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags)
enum ldlm_error *err)
{ {
struct ldlm_resource *res = req->l_resource; struct ldlm_resource *res = req->l_resource;
struct ldlm_namespace *ns = ldlm_res_to_ns(res); struct ldlm_namespace *ns = ldlm_res_to_ns(res);
...@@ -145,8 +144,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, ...@@ -145,8 +144,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
req->l_policy_data.l_flock.start, req->l_policy_data.l_flock.start,
req->l_policy_data.l_flock.end); req->l_policy_data.l_flock.end);
*err = ELDLM_OK;
/* No blocking ASTs are sent to the clients for /* No blocking ASTs are sent to the clients for
* Posix file & record locks * Posix file & record locks
*/ */
...@@ -192,7 +189,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, ...@@ -192,7 +189,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
if (*flags & LDLM_FL_BLOCK_NOWAIT) { if (*flags & LDLM_FL_BLOCK_NOWAIT) {
ldlm_flock_destroy(req, mode, *flags); ldlm_flock_destroy(req, mode, *flags);
*err = -EAGAIN;
return LDLM_ITER_STOP; return LDLM_ITER_STOP;
} }
...@@ -330,7 +326,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, ...@@ -330,7 +326,6 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
if (IS_ERR(new2)) { if (IS_ERR(new2)) {
ldlm_flock_destroy(req, lock->l_granted_mode, ldlm_flock_destroy(req, lock->l_granted_mode,
*flags); *flags);
*err = PTR_ERR(new2);
return LDLM_ITER_STOP; return LDLM_ITER_STOP;
} }
goto reprocess; goto reprocess;
...@@ -440,7 +435,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) ...@@ -440,7 +435,6 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
struct obd_import *imp = NULL; struct obd_import *imp = NULL;
struct ldlm_flock_wait_data fwd; struct ldlm_flock_wait_data fwd;
struct l_wait_info lwi; struct l_wait_info lwi;
enum ldlm_error err;
int rc = 0; int rc = 0;
OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4);
...@@ -595,7 +589,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) ...@@ -595,7 +589,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
/* We need to reprocess the lock to do merges or splits /* We need to reprocess the lock to do merges or splits
* with existing locks owned by this process. * with existing locks owned by this process.
*/ */
ldlm_process_flock_lock(lock, &noreproc, &err); ldlm_process_flock_lock(lock, &noreproc);
} }
unlock_res_and_lock(lock); unlock_res_and_lock(lock);
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment