summaryrefslogtreecommitdiffstats
path: root/fs/udf/udf_sb.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/udf_sb.h')
-rw-r--r--fs/udf/udf_sb.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 4d3bd77..2c05f82 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -43,46 +43,8 @@ static inline struct udf_sb_info *UDF_SB(struct super_block *sb)
struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct udf_sb_info *sbi);
-#define UDF_SB_ALLOC_BITMAP(X,Y,Z)\
-{\
- struct udf_sb_info *sbi = UDF_SB(X);\
- int nr_groups = ((sbi->s_partmaps[(Y)].s_partition_len + (sizeof(struct spaceBitmapDesc) << 3) +\
- ((X)->s_blocksize * 8) - 1) / ((X)->s_blocksize * 8));\
- int size = sizeof(struct udf_bitmap) + (sizeof(struct buffer_head *) * nr_groups);\
- if (size <= PAGE_SIZE)\
- sbi->s_partmaps[(Y)].Z.s_bitmap = kmalloc(size, GFP_KERNEL);\
- else\
- sbi->s_partmaps[(Y)].Z.s_bitmap = vmalloc(size);\
- if (sbi->s_partmaps[(Y)].Z.s_bitmap != NULL) {\
- memset(sbi->s_partmaps[(Y)].Z.s_bitmap, 0x00, size);\
- sbi->s_partmaps[(Y)].Z.s_bitmap->s_block_bitmap =\
- (struct buffer_head **)(sbi->s_partmaps[(Y)].Z.s_bitmap + 1);\
- sbi->s_partmaps[(Y)].Z.s_bitmap->s_nr_groups = nr_groups;\
- } else {\
- udf_error(X, __FUNCTION__, "Unable to allocate space for bitmap and %d buffer_head pointers", nr_groups);\
- }\
-}
-
-#define UDF_SB_FREE_BITMAP(X,Y,Z)\
-{\
- int i;\
- int nr_groups = UDF_SB_BITMAP_NR_GROUPS(X,Y,Z);\
- int size = sizeof(struct udf_bitmap) + (sizeof(struct buffer_head *) * nr_groups);\
- for (i = 0; i < nr_groups; i++) {\
- if (UDF_SB_BITMAP(X,Y,Z,i))\
- brelse(UDF_SB_BITMAP(X,Y,Z,i));\
- }\
- if (size <= PAGE_SIZE)\
- kfree(UDF_SB(X)->s_partmaps[Y].Z.s_bitmap);\
- else\
- vfree(UDF_SB(X)->s_partmaps[Y].Z.s_bitmap);\
-}
-
#define UDF_QUERY_FLAG(X,Y) ( UDF_SB(X)->s_flags & ( 1 << (Y) ) )
#define UDF_SET_FLAG(X,Y) ( UDF_SB(X)->s_flags |= ( 1 << (Y) ) )
#define UDF_CLEAR_FLAG(X,Y) ( UDF_SB(X)->s_flags &= ~( 1 << (Y) ) )
-#define UDF_SB_BITMAP(X,Y,Z,I) ( UDF_SB(X)->s_partmaps[(Y)].Z.s_bitmap->s_block_bitmap[I] )
-#define UDF_SB_BITMAP_NR_GROUPS(X,Y,Z) ( UDF_SB(X)->s_partmaps[(Y)].Z.s_bitmap->s_nr_groups )
-
#endif /* __LINUX_UDF_SB_H */
OpenPOWER on IntegriCloud