[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56616F0C.5080300@bjorling.me>
Date: Fri, 4 Dec 2015 11:46:36 +0100
From: Matias Bjørling <m@...rling.me>
To: Wenwei Tao <ww.tao0320@...il.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 3/3] lightnvm: fix media mgr registration
> > +struct nvmm_type *nvm_init_mgr(struct nvm_dev *dev)
>> +{
>> + struct nvmm_type *mt;
>> + int ret;
>> +
>> + lockdep_assert_held(&nvm_lock);
>> +
>> + list_for_each_entry(mt, &nvm_mgrs, list) {
>> + ret = mt->register_mgr(dev);
>> + if (ret < 0) {
>> + pr_err("nvm: media mgr failed to init (%d) on dev %s\n",
>> + ret, dev->name);
>> + return NULL; /* initialization failed */
>
> Do we just return or continue to try next media manager ? In my commit
>
> commit d0a712ceb83ebaea32d520825ee7b997f59b168f
>
> Author: Wenwei Tao <ww.tao0320@...il.com>
>
> Date: Sat Nov 28 16:49:28 2015 +0100
>
> lightnvm: missing nvm_lock acquire
>
> I use the second solution.
>
We just return. With the system blocks, there might now have been
registered a media manager, and that is why it should just give up if
nothing is found. On media manager module init, it will then attach
appropriately.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists