diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index dfb700efcd6b..52144b04f1af 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1161,6 +1161,15 @@ int btrfs_csum_truncate(struct btrfs_trans_handle *trans, | |||
1161 | struct btrfs_root *root, struct btrfs_path *path, | 1161 | struct btrfs_root *root, struct btrfs_path *path, |
1162 | u64 isize); | 1162 | u64 isize); |
1163 | /* inode.c */ | 1163 | /* inode.c */ |
1164 | static inline void dec_i_blocks(struct inode *inode, u64 dec) | ||
1165 | { | ||
1166 | dec = dec >> 9; | ||
1167 | if (dec <= inode->i_blocks) | ||
1168 | inode->i_blocks -= dec; | ||
1169 | else | ||
1170 | inode->i_blocks = 0; | ||
1171 | } | ||
1172 | |||
1164 | unsigned long btrfs_force_ra(struct address_space *mapping, | 1173 | unsigned long btrfs_force_ra(struct address_space *mapping, |
1165 | struct file_ra_state *ra, struct file *file, | 1174 | struct file_ra_state *ra, struct file *file, |
1166 | pgoff_t offset, pgoff_t last_index); | 1175 | pgoff_t offset, pgoff_t last_index); |