diff options
author | Liu Bo <liubo2009@cn.fujitsu.com> | 2012-07-10 05:28:39 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-07-23 16:28:00 -0400 |
commit | 83eea1f1bacd5dc7b44dcf84f5fdca54fdea5453 (patch) | |
tree | 6c4e2d70ece25c180c092aa4a8d69a71e73a55c6 /fs/btrfs/btrfs_inode.h | |
parent | 51a8cf9d2d97017d334f33f1b39067bd2f03bc49 (diff) | |
download | linux-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.h | 5 |
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; |