diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-21 09:27:38 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-21 09:27:38 -0400 |
commit | 0965537308ac3b267ea16e731bd73870a51c53b8 (patch) | |
tree | 7b52288b7272b2391f736dd82a313cbbaad68570 /fs/btrfs/btrfs_inode.h | |
parent | 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff) | |
parent | 82d5902d9c681be37ffa9d70482907f9f0b7ec1f (diff) |
Merge branch 'ino-alloc' of git://repo.or.cz/linux-btrfs-devel into inode_numbers
Conflicts:
fs/btrfs/free-space-cache.c
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 57c3bb2884ce..8842a4195f91 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -166,6 +166,15 @@ static inline struct btrfs_inode *BTRFS_I(struct inode *inode) return container_of(inode, struct btrfs_inode, vfs_inode); } +static inline u64 btrfs_ino(struct inode *inode) +{ + u64 ino = BTRFS_I(inode)->location.objectid; + + if (ino <= BTRFS_FIRST_FREE_OBJECTID) + ino = inode->i_ino; + return ino; +} + static inline void btrfs_i_size_write(struct inode *inode, u64 size) { i_size_write(inode, size); |