diff options
| author | David Sterba <[email protected]> | 2024-05-30 17:14:12 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2024-07-11 13:33:22 +0000 |
| commit | 2917f74102cf23afe770c1293aabce005f956b4f (patch) | |
| tree | ba69c547357811da7b2618e6a7a158ed57b0ec49 /fs/btrfs/btrfs_inode.h | |
| parent | btrfs: do not directly include rwlock_types.h (diff) | |
| download | kernel-2917f74102cf23afe770c1293aabce005f956b4f.tar.gz kernel-2917f74102cf23afe770c1293aabce005f956b4f.zip | |
btrfs: constify pointer parameters where applicable
We can add const to many parameters, this is for clarity and minor
addition to safety. There are some minor effects, in the assembly
code and .ko measured on release config. This patch does not cover all
possible conversions.
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
| -rw-r--r-- | fs/btrfs/btrfs_inode.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index d0864041c229..7a1858267506 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -413,12 +413,12 @@ static inline void btrfs_i_size_write(struct btrfs_inode *inode, u64 size) inode->disk_i_size = size; } -static inline bool btrfs_is_free_space_inode(struct btrfs_inode *inode) +static inline bool btrfs_is_free_space_inode(const struct btrfs_inode *inode) { return test_bit(BTRFS_INODE_FREE_SPACE_INODE, &inode->runtime_flags); } -static inline bool is_data_inode(struct inode *inode) +static inline bool is_data_inode(const struct inode *inode) { return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; } |
