From: Liu Bo Date: Tue, 18 Sep 2012 14:27:45 +0000 (-0600) Subject: Btrfs: fix a compiling warning X-Git-Tag: next-20121002~89^2~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e4b236730324841964878bc92514ff1932017cb9;p=karo-tx-linux.git Btrfs: fix a compiling warning 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 --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2a6e9fbcd02b..1f85d37aaec7 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: