Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753274AbbDCTuo (ORCPT ); Fri, 3 Apr 2015 15:50:44 -0400 Received: from mailrelay108.isp.belgacom.be ([195.238.20.135]:17181 "EHLO mailrelay108.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbbDCTul (ORCPT ); Fri, 3 Apr 2015 15:50:41 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=M25fSHNwW0AVyF8PBjdaZiLQS1FBtLFJFIDkHdlBKq0= c=1 sm=2 a=pdGK7M9yMnkD_5y9OoUA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AJDQBl7h5V/00iQFdcgwuBLrI2BgEBAQEBBQF7mCqBK00BAQEBAQF+QQGECi8jgRo3iDMBzSMshg+KEx2EFwWaa4EdiiyCBoZ9IoFFAYIrPDGCQwEBAQ From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: [PATCH V2 linux-next] Btrfs: use BTRFS_COMPRESS_NONE instead of 0 Date: Fri, 3 Apr 2015 21:50:34 +0200 Message-Id: <1428090634-21126-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1919 Lines: 55 cow_file_range_inline() was called with 0 instead of actual definition. btrfs_finish_ordered_io() initialized compress_type with 0 as well. (Thanks to David Sterba for suggesting this update). Signed-off-by: Fabian Frederick --- V2: also replace 0 in btrfs_finish_ordered_io() fs/btrfs/inode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5b6fbae..2f064d7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -524,7 +524,8 @@ cont: * to make an uncompressed inline extent. */ ret = cow_file_range_inline(root, inode, start, end, - 0, 0, NULL); + 0, BTRFS_COMPRESS_NONE, + NULL); } else { /* try making a compressed inline extent */ ret = cow_file_range_inline(root, inode, start, end, @@ -943,8 +944,8 @@ static noinline int cow_file_range(struct inode *inode, if (start == 0) { /* lets try to make an inline extent */ - ret = cow_file_range_inline(root, inode, start, end, 0, 0, - NULL); + ret = cow_file_range_inline(root, inode, start, end, 0, + BTRFS_COMPRESS_NONE, NULL); if (ret == 0) { extent_clear_unlock_delalloc(inode, start, end, NULL, EXTENT_LOCKED | EXTENT_DELALLOC | @@ -2793,7 +2794,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; struct extent_state *cached_state = NULL; struct new_sa_defrag_extent *new = NULL; - int compress_type = 0; + int compress_type = BTRFS_COMPRESS_NONE; int ret = 0; u64 logical_len = ordered_extent->len; bool nolock; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/