The Samba-Bugzilla – Attachment 10860 Details for
Bug 11159
Missing invocations of x_unlink() when there was an error within get_file_from_cache().
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Leave comments about missing invocations of x_unlinks when there is an error in get_file_from_cache() failed.
0006-warning-about-missing-x_unlinks-when-get_file_from_c.patch (text/plain), 2.05 KB, created by
ishikawa
on 2015-03-11 16:07:37 UTC
(
hide
)
Description:
Leave comments about missing invocations of x_unlinks when there is an error in get_file_from_cache() failed.
Filename:
MIME Type:
Creator:
ishikawa
Created:
2015-03-11 16:07:37 UTC
Size:
2.05 KB
patch
obsolete
>From c898a46cb5123ee1f854f5bab2a500b871f94568 Mon Sep 17 00:00:00 2001 >From: Chiaki ISHIKAWA <ishikawa@yk.rim.or.jp> >Date: Tue, 10 Mar 2015 22:23:48 +0900 >Subject: [PATCH 6/8] warning about missing x_unlinks when > get_file_from_cache() failed. > >--- > ccache.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > >diff --git a/ccache.c b/ccache.c >index 02a0d76..92bfb21 100644 >--- a/ccache.c >+++ b/ccache.c >@@ -1533,14 +1533,42 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) > if (!str_eq(output_obj, "/dev/null")) { > get_file_from_cache(cached_obj, output_obj); > cc_log("Created (output_obj) %s from (cached_obj) %s", output_obj, cached_obj); >+ /* >+ * if something failed internal to get_file_from_cache we may >+ * want to remove some files: the following x_unlink calls >+ * were in the original code circa 2014 summer. >+ * >+ * Similar comments are repeated in code below. >+ * >+ * Does failed(), which is called when error exit is taken, >+ * handle this now? If so, this comment is superflous. >+ * >+ * if (output_dwo) x_unlink(output_dwo); >+ * if (cached_dwo) x_unlink(cached_dwo); >+ * x_unlink(output_obj); >+ * x_unlink(cached_stderr); >+ * x_unlink(cached_obj); >+ * x_unlink(cached_dep); >+ *x_unlink(cached_dia); >+ */ > } > if (produce_dep_file) { > get_file_from_cache(cached_dep, output_dep); > cc_log("Created (output_dep) %s from (cached_dep) %s", output_dep, cached_dep); >+ /* >+ * Note: if something failed internal to get_file_from_cache >+ * we may want to remove a flurry of files. >+ * There were calls to x_unlinks in the original code circa 2014 summer. >+ */ > } > if (output_dia) { > get_file_from_cache(cached_dia, output_dia); > cc_log("Created (output_dia) %s from (cached_dia) %s", output_dia, cached_dia); >+ /* >+ * Note: if something failed internal to get_file_from_cache >+ * we may want to remove a flurry of files. >+ * There were calls to x_unlinks in the original code circa 2014 summer. >+ */ > } > > /* Update modification timestamps to save files from LRU cleanup. >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11159
: 10860