diff options
-rw-r--r-- | fs/ocfs2/ocfs2_fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h index 67bb8a77e868..b01d0dddfcc1 100644 --- a/fs/ocfs2/ocfs2_fs.h +++ b/fs/ocfs2/ocfs2_fs.h | |||
@@ -1574,5 +1574,19 @@ static inline void ocfs2_set_de_type(struct ocfs2_dir_entry *de, | |||
1574 | de->file_type = ocfs2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; | 1574 | de->file_type = ocfs2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; |
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | static inline int ocfs2_gd_is_discontig(struct ocfs2_group_desc *gd) | ||
1578 | { | ||
1579 | if ((offsetof(struct ocfs2_group_desc, bg_bitmap) + | ||
1580 | le16_to_cpu(gd->bg_size)) != | ||
1581 | offsetof(struct ocfs2_group_desc, bg_list)) | ||
1582 | return 0; | ||
1583 | /* | ||
1584 | * Only valid to check l_next_free_rec if | ||
1585 | * bg_bitmap + bg_size == bg_list. | ||
1586 | */ | ||
1587 | if (!gd->bg_list.l_next_free_rec) | ||
1588 | return 0; | ||
1589 | return 1; | ||
1590 | } | ||
1577 | #endif /* _OCFS2_FS_H */ | 1591 | #endif /* _OCFS2_FS_H */ |
1578 | 1592 | ||