diff options
author | Anoop C S <achiraya@redhat.com> | 2015-03-17 16:29:53 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-17 21:07:58 -0700 |
commit | 33944a3eb3b589b1d309826b5f431497924ac3ae (patch) | |
tree | 699293090dd72de4167c0f7dada8c945acbe5da7 | |
parent | 7970183f4c730d4aca3cfaa106fde015a0fbc415 (diff) |
features/trash: Avoid unnecessary logging from trash_local_wipe
Even when trash translator is disabled, the following error
is being logged for each unlink/truncate/ftruncate calls.
[...] E [trash.c:221:trash_local_wipe] (--> ...
... ) 0-trash: invalid argument: local
This change replaces GF_VALIDATE_OR_GOTO macro with simple
if condition.
Change-Id: I7e6754cd53ec7c2d84669b6d40d883a2d1eee41e
BUG: 1132465
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-on: http://review.gluster.org/9909
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/features/trash/src/trash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index 4eecaf241c6..00e99b6266f 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -218,7 +218,8 @@ append_time_stamp (char *name) void trash_local_wipe (trash_local_t *local) { - GF_VALIDATE_OR_GOTO ("trash", local, out); + if (!local) + goto out; loc_wipe (&local->loc); loc_wipe (&local->newloc); |