From patchwork Tue May 21 02:39:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2595581 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 65BEF3FE81 for ; Tue, 21 May 2013 02:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755340Ab3EUCjX (ORCPT ); Mon, 20 May 2013 22:39:23 -0400 Received: from mail-bk0-f51.google.com ([209.85.214.51]:63203 "EHLO mail-bk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750804Ab3EUCjX (ORCPT ); Mon, 20 May 2013 22:39:23 -0400 Received: by mail-bk0-f51.google.com with SMTP id ji2so58866bkc.10 for ; Mon, 20 May 2013 19:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=E6zrFGJJAXQU+vZY/zl7P1Z0jfkthipI1YRHhcRsIds=; b=Vw52v5+JDUjMf38CuKrp7YIwEvOBNLoip7oDrW8TlXYkXOtqnT9cWgQRekz6IGwKTa oQA+vJ3waqGwJGlWtWs50Q9swEpMIaxb76OfGHpW3zAHKr9YkJXPo+NKevNYju20RrYt uFJfZ5Zh0eEjNeesoGYB5OBsHlaQLb9mjSB4fMQZLRZLx+OsAQirh6aRr4C0Ww+7i+ON GgtykqWzFdhgzJqmUZnxlR307MZKkIAR9XGtv3TwxuvCHRgNKdmoroy/3Y9KovTtEqsV +R5AESF9q3B3uBPCGUtV0NZDemI9R6WWnZPIksYCTV6fkVD/YsHADf+av6YYLvhz7300 +znw== MIME-Version: 1.0 X-Received: by 10.205.114.207 with SMTP id fb15mr57140bkc.137.1369103961719; Mon, 20 May 2013 19:39:21 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Mon, 20 May 2013 19:39:21 -0700 (PDT) Date: Tue, 21 May 2013 10:39:21 +0800 Message-ID: Subject: [PATCH -next] Btrfs: return error code in btrfs_check_trunc_cache_free_space() From: Wei Yongjun To: chris.mason@fusionio.com, miaox@cn.fujitsu.com Cc: yongjun_wei@trendmicro.com.cn, linux-btrfs@vger.kernel.org Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Wei Yongjun Fix to return error code instead always return 0 from function btrfs_check_trunc_cache_free_space(). Introduced by commit 7b61cd92242542944fc27024900c495a6a7b3396 (Btrfs: don't use global block reservation for inode cache truncation) Signed-off-by: Wei Yongjun Reviewed-by: Miao Xie --- fs/btrfs/free-space-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index e530096..73577f4 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -213,7 +213,7 @@ int btrfs_check_trunc_cache_free_space(struct btrfs_root *root, else ret = 0; spin_unlock(&rsv->lock); - return 0; + return ret; } int btrfs_truncate_free_space_cache(struct btrfs_root *root,