[PATCH 11/24] udf: convert UDF_SB_LVID macro to udf_sb_lvid function
Signed-off-by: Marcin Slusarz <[EMAIL PROTECTED]> CC: Ben Fennema <[EMAIL PROTECTED]> CC: Jan Kara <[EMAIL PROTECTED]> --- fs/udf/balloc.c | 24 fs/udf/ialloc.c |2 +- fs/udf/namei.c |4 ++-- fs/udf/super.c | 40 fs/udf/udf_sb.h |8 ++-- 5 files changed, 41 insertions(+), 37 deletions(-) diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index d689d16..4c31666 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c @@ -189,8 +189,8 @@ do_more: if (inode) DQUOT_FREE_BLOCK(inode, 1); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[udf_sb_partition(sb)] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[udf_sb_partition(sb)]) + 1); + udf_sb_lvid(sb)->freeSpaceTable[udf_sb_partition(sb)] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[udf_sb_partition(sb)]) + 1); } } } @@ -262,8 +262,8 @@ repeat: goto repeat; out: if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[partition]) - alloc_count); + udf_sb_lvid(sb)->freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[partition]) - alloc_count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } sb->s_dirt = 1; @@ -390,8 +390,8 @@ got_block: mark_buffer_dirty(bh); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[partition]) - 1); + udf_sb_lvid(sb)->freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[partition]) - 1); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } sb->s_dirt = 1; @@ -433,8 +433,8 @@ static void udf_table_free_blocks(struct super_block *sb, if (inode) DQUOT_FREE_BLOCK(inode, count); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[udf_sb_partition(sb)] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[udf_sb_partition(sb)]) + count); + udf_sb_lvid(sb)->freeSpaceTable[udf_sb_partition(sb)] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[udf_sb_partition(sb)]) + count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } @@ -671,8 +671,8 @@ static int udf_table_prealloc_blocks(struct super_block *sb, brelse(epos.bh); if (alloc_count && udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[partition]) - alloc_count); + udf_sb_lvid(sb)->freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[partition]) - alloc_count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); sb->s_dirt = 1; } @@ -772,8 +772,8 @@ static int udf_table_new_block(struct super_block *sb, brelse(goal_epos.bh); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)->freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)->freeSpaceTable[partition]) - 1); + udf_sb_lvid(sb)->freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)->freeSpaceTable[partition]) - 1); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index 5cfac06..ddbf1e6 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c @@ -91,7 +91,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err) if (udf_sb_lvid_bh(sb)) { struct logicalVolHeaderDesc *lvhd; uint64_t uniqueID; - lvhd = (struct logicalVolHeaderDesc *)(UDF_SB_LVID(sb)->logicalVolContentsUse); + lvhd = (struct logicalVolHeaderDesc *)(udf_sb_lvid(sb)->logicalVolContentsUse); if (S_ISDIR(mode)) UDF_SB_LVIDIU(sb)->numDirs = cpu_to_le32(le32_to_cpu(UDF_SB_LVIDIU(sb)->numDirs) + 1); diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 4122d2b..4a18bfc 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1017,7 +1017,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, if (udf_sb_lvid_bh(inode->i_sb)) { struct logicalVolHeaderDesc *lvhd; uint64_t uniqueID; - lvhd =
[PATCH 11/24] udf: convert UDF_SB_LVID macro to udf_sb_lvid function
Signed-off-by: Marcin Slusarz [EMAIL PROTECTED] CC: Ben Fennema [EMAIL PROTECTED] CC: Jan Kara [EMAIL PROTECTED] --- fs/udf/balloc.c | 24 fs/udf/ialloc.c |2 +- fs/udf/namei.c |4 ++-- fs/udf/super.c | 40 fs/udf/udf_sb.h |8 ++-- 5 files changed, 41 insertions(+), 37 deletions(-) diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index d689d16..4c31666 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c @@ -189,8 +189,8 @@ do_more: if (inode) DQUOT_FREE_BLOCK(inode, 1); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[udf_sb_partition(sb)] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[udf_sb_partition(sb)]) + 1); + udf_sb_lvid(sb)-freeSpaceTable[udf_sb_partition(sb)] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[udf_sb_partition(sb)]) + 1); } } } @@ -262,8 +262,8 @@ repeat: goto repeat; out: if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[partition]) - alloc_count); + udf_sb_lvid(sb)-freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[partition]) - alloc_count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } sb-s_dirt = 1; @@ -390,8 +390,8 @@ got_block: mark_buffer_dirty(bh); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[partition]) - 1); + udf_sb_lvid(sb)-freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[partition]) - 1); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } sb-s_dirt = 1; @@ -433,8 +433,8 @@ static void udf_table_free_blocks(struct super_block *sb, if (inode) DQUOT_FREE_BLOCK(inode, count); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[udf_sb_partition(sb)] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[udf_sb_partition(sb)]) + count); + udf_sb_lvid(sb)-freeSpaceTable[udf_sb_partition(sb)] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[udf_sb_partition(sb)]) + count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } @@ -671,8 +671,8 @@ static int udf_table_prealloc_blocks(struct super_block *sb, brelse(epos.bh); if (alloc_count udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[partition]) - alloc_count); + udf_sb_lvid(sb)-freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[partition]) - alloc_count); mark_buffer_dirty(udf_sb_lvid_bh(sb)); sb-s_dirt = 1; } @@ -772,8 +772,8 @@ static int udf_table_new_block(struct super_block *sb, brelse(goal_epos.bh); if (udf_sb_lvid_bh(sb)) { - UDF_SB_LVID(sb)-freeSpaceTable[partition] = - cpu_to_le32(le32_to_cpu(UDF_SB_LVID(sb)-freeSpaceTable[partition]) - 1); + udf_sb_lvid(sb)-freeSpaceTable[partition] = + cpu_to_le32(le32_to_cpu(udf_sb_lvid(sb)-freeSpaceTable[partition]) - 1); mark_buffer_dirty(udf_sb_lvid_bh(sb)); } diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index 5cfac06..ddbf1e6 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c @@ -91,7 +91,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err) if (udf_sb_lvid_bh(sb)) { struct logicalVolHeaderDesc *lvhd; uint64_t uniqueID; - lvhd = (struct logicalVolHeaderDesc *)(UDF_SB_LVID(sb)-logicalVolContentsUse); + lvhd = (struct logicalVolHeaderDesc *)(udf_sb_lvid(sb)-logicalVolContentsUse); if (S_ISDIR(mode)) UDF_SB_LVIDIU(sb)-numDirs = cpu_to_le32(le32_to_cpu(UDF_SB_LVIDIU(sb)-numDirs) + 1); diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 4122d2b..4a18bfc 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1017,7 +1017,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, if (udf_sb_lvid_bh(inode-i_sb)) { struct logicalVolHeaderDesc *lvhd; uint64_t uniqueID; - lvhd = (struct logicalVolHeaderDesc