fix for per-mount i/o counting in ffs

Bruce Evans brde at optusnet.com.au
Fri May 20 11:33:32 UTC 2016


PS (sigh):

On Fri, 20 May 2016, Bruce Evans wrote:

> On Fri, 20 May 2016, Konstantin Belousov wrote:
>
>> On Fri, May 20, 2016 at 09:27:38AM +1000, Bruce Evans wrote:
>>> ...
>>> I now see another cleanup: don't goto out when g_vfs_open() fails.  This
>>> depends on it setting cp to NULL and leaving nothing to clean when it
>>> fails.  It has no man page and this detail is documented in its source
>>> code.
>> Then I would need to add another NULL assignment, VOP_UNLOCK etc.
>
> g_vfs_open() already sets cp to NULL when it fails, and the cleanup
> depends on that now, but it is just as good to depend on no cleanup
> being needed on failure.  You do need another dev_rel().

Oops, you mean another NULL assignment (atomic op) for cleaning up
si_mountpt.  I got that right at the end where I moved things to
g_vfs_open().

Bruce


More information about the freebsd-fs mailing list