diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-11-10 01:13:09 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2016-12-10 23:39:45 +0300 |
commit | 84e40080bd6f363ddbcab75b04cb7bc742efbf12 (patch) | |
tree | bdbaf3074c1798ff5450ca004823e4e301b45ff8 /fs/ocfs2/inode.h | |
parent | 876bec6f9bbfcb394916d17e35226b086c04dc45 (diff) | |
download | linux-84e40080bd6f363ddbcab75b04cb7bc742efbf12.tar.xz |
ocfs2: convert inode refcount test to a helper
Replace the open-coded inode refcount flag test with a helper function
to reduce the potential for bugs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/ocfs2/inode.h')
-rw-r--r-- | fs/ocfs2/inode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index 5af68fcdf9d3..9b955f732bca 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h @@ -181,4 +181,10 @@ static inline struct ocfs2_inode_info *cache_info_to_inode(struct ocfs2_caching_ return container_of(ci, struct ocfs2_inode_info, ip_metadata_cache); } +/* Does this inode have the reflink flag set? */ +static inline bool ocfs2_is_refcount_inode(struct inode *inode) +{ + return (OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL); +} + #endif /* OCFS2_INODE_H */ |