1.1 --- a/libfsserver/lib/generic/resource_registry.cc Mon Feb 14 23:07:26 2022 +0100
1.2 +++ b/libfsserver/lib/generic/resource_registry.cc Tue Feb 15 22:01:34 2022 +0100
1.3 @@ -195,7 +195,7 @@
1.4 /* Obtain a provider for the object. */
1.5
1.6 Provider *provider;
1.7 - long err = find_provider(fileid, &provider);
1.8 + long err = find_provider(fileid, &provider), lookup_err = err;
1.9
1.10 if (err && (err != -L4_ENOENT))
1.11 return err;
1.12 @@ -207,7 +207,7 @@
1.13 if (err)
1.14 return err;
1.15
1.16 - /* Unlink the object regardless of whether it can be removed. */
1.17 + /* Unlink the object regardless of whether it will be removed. */
1.18
1.19 err = opening->unlink_object(parent_fileid, fileid);
1.20
1.21 @@ -216,7 +216,7 @@
1.22
1.23 /* Without a provider being active, remove the object directly. */
1.24
1.25 - if (err)
1.26 + if (lookup_err)
1.27 return opening->remove_object(fileid);
1.28
1.29 /* With a provider active, request the object's removal upon closure. */