summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorLiu Bo <liubo2009@cn.fujitsu.com>2012-07-10 05:28:39 -0600
committerChris Mason <chris.mason@fusionio.com>2012-07-23 16:28:00 -0400
commit83eea1f1bacd5dc7b44dcf84f5fdca54fdea5453 (patch)
tree6c4e2d70ece25c180c092aa4a8d69a71e73a55c6 /fs/btrfs/btrfs_inode.h
parent51a8cf9d2d97017d334f33f1b39067bd2f03bc49 (diff)
downloadlinux-83eea1f1bacd5dc7b44dcf84f5fdca54fdea5453.tar.bz2
Btrfs: kill root from btrfs_is_free_space_inode
Since root can be fetched via BTRFS_I macro directly, we can save an args for btrfs_is_free_space_inode(). Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index b168238bcb13..21b8cfe08e95 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -191,9 +191,10 @@ static inline void btrfs_i_size_write(struct inode *inode, u64 size)
BTRFS_I(inode)->disk_i_size = size;
}
-static inline bool btrfs_is_free_space_inode(struct btrfs_root *root,
- struct inode *inode)
+static inline bool btrfs_is_free_space_inode(struct inode *inode)
{
+ struct btrfs_root *root = BTRFS_I(inode)->root;
+
if (root == root->fs_info->tree_root &&
btrfs_ino(inode) != BTRFS_BTREE_INODE_OBJECTID)
return true;