From patchwork Tue Sep 18 14:27:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 1473311 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2CE49DF24C for ; Tue, 18 Sep 2012 14:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933067Ab2IRO3v (ORCPT ); Tue, 18 Sep 2012 10:29:51 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:41558 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758101Ab2IRO3u (ORCPT ); Tue, 18 Sep 2012 10:29:50 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8IETii0001546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Sep 2012 14:29:44 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8IETh1N016973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Sep 2012 14:29:44 GMT Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8IEThKa021545; Tue, 18 Sep 2012 09:29:43 -0500 Received: from localhost.localdomain (/219.144.173.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 18 Sep 2012 07:29:42 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Cc: fengguang.wu@intel.com Subject: [PATCH] Btrfs: fix a compiling warning Date: Tue, 18 Sep 2012 22:27:45 +0800 Message-Id: <1347978465-20500-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 1.7.7.6 MIME-Version: 1.0 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org NOTE: This is against btrfs-next git repo. fs/btrfs/inode.c: In function ‘relink_extent_backref’: fs/btrfs/inode.c:2185:6: warning: passing argument 2 of ‘btrfs_drop_extents’ from incompatible pointer type [enabled by default] fs/btrfs/ctree.h:3340:5: note: expected ‘struct btrfs_root *’ but argument is of type ‘struct inode *’ fs/btrfs/inode.c:2185:6: warning: passing argument 3 of ‘btrfs_drop_extents’ makes pointer from integer without a cast [enabled by default] fs/btrfs/ctree.h:3340:5: note: expected ‘struct inode *’ but argument is of type ‘u64’ fs/btrfs/inode.c:2185:6: warning: passing argument 5 of ‘btrfs_drop_extents’ makes integer from pointer without a cast [enabled by default] fs/btrfs/ctree.h:3340:5: note: expected ‘u64’ but argument is of type ‘u64 *’ We didn't update the related functions after someone changed the API. This fixes it. Reported-by: Signed-off-by: Liu Bo --- fs/btrfs/inode.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2a6e9fb..1f85d37 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2095,7 +2095,6 @@ static noinline int relink_extent_backref(struct btrfs_path *path, struct inode *inode; struct extent_state *cached = NULL; int ret = 0; - u64 hint_byte; u64 start; u64 len; bool merge = false; @@ -2181,8 +2180,8 @@ static noinline int relink_extent_backref(struct btrfs_path *path, old->extent_offset + old->offset + old->len); len -= max(backref->extent_offset, old->extent_offset + old->offset); - ret = btrfs_drop_extents(trans, inode, start, - start + len, &hint_byte, 1); + ret = btrfs_drop_extents(trans, BTRFS_I(inode)->root, inode, start, + start + len, 1); if (ret) goto out_free_path; again: