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>
This commit is contained in:
Anoop C S 2015-03-17 16:29:53 +05:30 committed by Vijay Bellur
parent 7970183f4c
commit 33944a3eb3

View File

@ -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);