From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 03/24] lustre: ldlm: rid of obsolete param of ldlm_resource_get()
Date: Mon, 5 Sep 2022 21:55:16 -0400 [thread overview]
Message-ID: <1662429337-18737-4-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1662429337-18737-1-git-send-email-jsimmons@infradead.org>
From: Bobi Jam <bobijam@whamcloud.com>
The second parameter @parent of ldlm_resource_get() is obsolete, just
remove it.
WC-bug-id: https://jira.whamcloud.com/browse/LU-8238
Lustre-commit: bab7c8998a6539c0d ("LU-8238 ldlm: rid of obsolete param of ldlm_resource_get()")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/20631
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
fs/lustre/include/lustre_dlm.h | 1 -
fs/lustre/ldlm/ldlm_lock.c | 6 +++---
fs/lustre/ldlm/ldlm_request.c | 4 ++--
fs/lustre/ldlm/ldlm_resource.c | 6 ++----
fs/lustre/mdc/mdc_dev.c | 5 +++--
fs/lustre/mdc/mdc_locks.c | 2 +-
fs/lustre/mdc/mdc_reint.c | 2 +-
fs/lustre/osc/osc_object.c | 6 +++---
fs/lustre/osc/osc_request.c | 2 +-
9 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/fs/lustre/include/lustre_dlm.h b/fs/lustre/include/lustre_dlm.h
index 9286bec..6053e01 100644
--- a/fs/lustre/include/lustre_dlm.h
+++ b/fs/lustre/include/lustre_dlm.h
@@ -1287,7 +1287,6 @@ static inline void ldlm_svc_get_eopc(const struct ldlm_request *dlm_req,
/* resource.c - internal */
struct ldlm_resource *ldlm_resource_get(struct ldlm_namespace *ns,
- struct ldlm_resource *parent,
const struct ldlm_res_id *,
enum ldlm_type type, int create);
struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res);
diff --git a/fs/lustre/ldlm/ldlm_lock.c b/fs/lustre/ldlm/ldlm_lock.c
index 4225c0b..39ab2a0 100644
--- a/fs/lustre/ldlm/ldlm_lock.c
+++ b/fs/lustre/ldlm/ldlm_lock.c
@@ -447,7 +447,7 @@ int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
type = oldres->lr_type;
unlock_res_and_lock(lock);
- newres = ldlm_resource_get(ns, NULL, new_resid, type, 1);
+ newres = ldlm_resource_get(ns, new_resid, type, 1);
if (IS_ERR(newres))
return PTR_ERR(newres);
@@ -1308,7 +1308,7 @@ enum ldlm_mode ldlm_lock_match_with_skip(struct ldlm_namespace *ns,
*data.lmd_mode = data.lmd_old->l_req_mode;
}
- res = ldlm_resource_get(ns, NULL, res_id, type, 0);
+ res = ldlm_resource_get(ns, res_id, type, 0);
if (IS_ERR(res)) {
LASSERT(!data.lmd_old);
return 0;
@@ -1537,7 +1537,7 @@ struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
struct ldlm_resource *res;
int rc;
- res = ldlm_resource_get(ns, NULL, res_id, type, 1);
+ res = ldlm_resource_get(ns, res_id, type, 1);
if (IS_ERR(res))
return ERR_CAST(res);
diff --git a/fs/lustre/ldlm/ldlm_request.c b/fs/lustre/ldlm/ldlm_request.c
index 4ba64b1..f59778e 100644
--- a/fs/lustre/ldlm/ldlm_request.c
+++ b/fs/lustre/ldlm/ldlm_request.c
@@ -1887,7 +1887,7 @@ int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
int count;
int rc;
- res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
+ res = ldlm_resource_get(ns, res_id, 0, 0);
if (IS_ERR(res)) {
/* This is not a problem. */
CDEBUG(D_INFO, "No resource %llu\n", res_id->name[0]);
@@ -2039,7 +2039,7 @@ int ldlm_resource_iterate(struct ldlm_namespace *ns,
LASSERTF(ns, "must pass in namespace\n");
- res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
+ res = ldlm_resource_get(ns, res_id, 0, 0);
if (IS_ERR(res))
return 0;
diff --git a/fs/lustre/ldlm/ldlm_resource.c b/fs/lustre/ldlm/ldlm_resource.c
index d4b6e41..a189dbd 100644
--- a/fs/lustre/ldlm/ldlm_resource.c
+++ b/fs/lustre/ldlm/ldlm_resource.c
@@ -1105,9 +1105,8 @@ static struct ldlm_resource *ldlm_resource_new(enum ldlm_type ldlm_type)
* Returns: referenced, unlocked ldlm_resource or NULL
*/
struct ldlm_resource *
-ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent,
- const struct ldlm_res_id *name, enum ldlm_type type,
- int create)
+ldlm_resource_get(struct ldlm_namespace *ns, const struct ldlm_res_id *name,
+ enum ldlm_type type, int create)
{
struct hlist_node *hnode;
struct ldlm_resource *res = NULL;
@@ -1116,7 +1115,6 @@ struct ldlm_resource *
int ns_refcount = 0;
int hash;
- LASSERT(!parent);
LASSERT(ns->ns_rs_hash);
LASSERT(name->name[0] != 0);
diff --git a/fs/lustre/mdc/mdc_dev.c b/fs/lustre/mdc/mdc_dev.c
index de67720..fd0e362 100644
--- a/fs/lustre/mdc/mdc_dev.c
+++ b/fs/lustre/mdc/mdc_dev.c
@@ -998,13 +998,14 @@ static int mdc_get_lock_handle(const struct lu_env *env, struct osc_object *osc,
OSC_DAP_FL_TEST_LOCK |
OSC_DAP_FL_CANCELING);
if (!lock) {
+ struct ldlm_namespace *ns;
struct ldlm_resource *res;
struct ldlm_res_id *resname;
resname = &osc_env_info(env)->oti_resname;
fid_build_reg_res_name(lu_object_fid(osc2lu(osc)), resname);
- res = ldlm_resource_get(osc_export(osc)->exp_obd->obd_namespace,
- NULL, resname, LDLM_IBITS, 0);
+ ns = osc_export(osc)->exp_obd->obd_namespace;
+ res = ldlm_resource_get(ns, resname, LDLM_IBITS, 0);
ldlm_resource_dump(D_ERROR, res);
libcfs_debug_dumpstack(NULL);
rc = -ENOENT;
diff --git a/fs/lustre/mdc/mdc_locks.c b/fs/lustre/mdc/mdc_locks.c
index 2a9b9a8..ae55cc3 100644
--- a/fs/lustre/mdc/mdc_locks.c
+++ b/fs/lustre/mdc/mdc_locks.c
@@ -177,7 +177,7 @@ int mdc_null_inode(struct obd_export *exp,
fid_build_reg_res_name(fid, &res_id);
- res = ldlm_resource_get(ns, NULL, &res_id, 0, 0);
+ res = ldlm_resource_get(ns, &res_id, 0, 0);
if (IS_ERR(res))
return 0;
diff --git a/fs/lustre/mdc/mdc_reint.c b/fs/lustre/mdc/mdc_reint.c
index 3f4e28a..4d33655 100644
--- a/fs/lustre/mdc/mdc_reint.c
+++ b/fs/lustre/mdc/mdc_reint.c
@@ -81,7 +81,7 @@ int mdc_resource_get_unused_res(struct obd_export *exp,
if (exp_connect_cancelset(exp) && !ns_connect_cancelset(ns))
return 0;
- res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
+ res = ldlm_resource_get(ns, res_id, 0, 0);
if (IS_ERR(res))
return 0;
LDLM_RESOURCE_ADDREF(res);
diff --git a/fs/lustre/osc/osc_object.c b/fs/lustre/osc/osc_object.c
index 517ce5c..efb0533 100644
--- a/fs/lustre/osc/osc_object.c
+++ b/fs/lustre/osc/osc_object.c
@@ -389,6 +389,7 @@ static void osc_req_attr_set(const struct lu_env *env, struct cl_object *obj,
lock = osc_dlmlock_at_pgoff(env, cl2osc(obj), osc_index(opg),
OSC_DAP_FL_TEST_LOCK | OSC_DAP_FL_CANCELING);
if (!lock && !opg->ops_srvlock) {
+ struct ldlm_namespace *ns;
struct ldlm_resource *res;
struct ldlm_res_id *resname;
@@ -397,9 +398,8 @@ static void osc_req_attr_set(const struct lu_env *env, struct cl_object *obj,
resname = &osc_env_info(env)->oti_resname;
ostid_build_res_name(&oinfo->loi_oi, resname);
- res = ldlm_resource_get(
- osc_export(cl2osc(obj))->exp_obd->obd_namespace,
- NULL, resname, LDLM_EXTENT, 0);
+ ns = osc_export(cl2osc(obj))->exp_obd->obd_namespace;
+ res = ldlm_resource_get(ns, resname, LDLM_EXTENT, 0);
ldlm_resource_dump(D_ERROR, res);
libcfs_debug_dumpstack(NULL);
LBUG();
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index 21e036e..5a4db29 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -587,7 +587,7 @@ static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
return 0;
ostid_build_res_name(&oa->o_oi, &res_id);
- res = ldlm_resource_get(ns, NULL, &res_id, 0, 0);
+ res = ldlm_resource_get(ns, &res_id, 0, 0);
if (IS_ERR(res))
return 0;
--
1.8.3.1
_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
next prev parent reply other threads:[~2022-09-06 1:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 1:55 [lustre-devel] [PATCH 00/24] lustre: update to OpenSFS tree Sept 5, 2022 James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 01/24] lustre: sec: new connect flag for name encryption James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 02/24] lustre: lmv: always space-balance r-r directories James Simmons
2022-09-06 1:55 ` James Simmons [this message]
2022-09-06 1:55 ` [lustre-devel] [PATCH 04/24] lustre: llite: fully disable readahead in kernel I/O path James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 05/24] lustre: llite: use fatal_signal_pending in range_lock James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 06/24] lustre: update version to 2.15.51 James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 07/24] lustre: llite: simplify callback handling for async getattr James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 08/24] lustre: statahead: add total hit/miss count stats James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 09/24] lnet: o2iblnd: Salt comp_vector James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 10/24] lnet: selftest: use preallocate bulk for server James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 11/24] lnet: change ni_status in lnet_ni to u32* James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 12/24] lustre: llite: Rework upper/lower DIO/AIO James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 13/24] lustre: sec: use enc pool for bounce pages James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 14/24] lustre: llite: Unify range unlock James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 15/24] lustre: llite: Refactor DIO/AIO free code James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 16/24] lnet: Use fatal NI if none other available James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 17/24] lnet: LNet peer aliveness broken James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 18/24] lnet: Correct net selection for router ping James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 19/24] lnet: Remove duplicate checks for peer sensitivity James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 20/24] lustre: obdclass: use consistent stats units James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 21/24] lnet: Memory leak on adding existing interface James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 22/24] lustre: sec: fix detection of SELinux enforcement James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 23/24] lustre: idl: add checks for OBD_CONNECT flags James Simmons
2022-09-06 1:55 ` [lustre-devel] [PATCH 24/24] lustre: llite: fix stat attributes_mask James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1662429337-18737-4-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=adilger@whamcloud.com \
--cc=green@whamcloud.com \
--cc=lustre-devel@lists.lustre.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).