diff options
author | NeilBrown <neilb@suse.com> | 2018-03-02 02:31:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-06 15:17:27 +0300 |
commit | 3ab19e61b3adf550fd280fd6e0604da82368bd73 (patch) | |
tree | 57749f7cc6540d6f3b46f13c63bad6a71972bb28 /drivers | |
parent | f689c72d7dbc7bab1cc20440ceccf2c240530d5b (diff) | |
download | linux-3ab19e61b3adf550fd280fd6e0604da82368bd73.tar.xz |
staging: lustre: obdclass: don't require lct_owner to be non-NULL.
Some places in lu_object.c allow lct_owner to be NULL, implying
that the code is built in to the kernel (not a module), but
two places don't. This prevents us from building lustre into
the kernel.
So remove the requirement and always allow lct_owner to be NULL.
This requires removing an "assert" that the module count is positive,
but this is redundant as module_put() already does the necessary test.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/lu_object.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 964e854858d6..8ddf23b82a2c 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -1380,12 +1380,8 @@ static void key_fini(struct lu_context *ctx, int index) lu_ref_del(&key->lct_reference, "ctx", ctx); atomic_dec(&key->lct_used); - if ((ctx->lc_tags & LCT_NOREF) == 0) { -#ifdef CONFIG_MODULE_UNLOAD - LINVRNT(module_refcount(key->lct_owner) > 0); -#endif + if ((ctx->lc_tags & LCT_NOREF) == 0) module_put(key->lct_owner); - } ctx->lc_value[index] = NULL; } } @@ -1619,7 +1615,6 @@ static int keys_fill(struct lu_context *ctx) LINVRNT(key->lct_init); LINVRNT(key->lct_index == i); - LASSERT(key->lct_owner); if (!(ctx->lc_tags & LCT_NOREF) && !try_module_get(key->lct_owner)) { /* module is unloading, skip this key */ |