diff options
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r-- | fs/udf/inode.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index dc2f946dfca..91d1f1d3d7a 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1748,9 +1748,7 @@ int8_t udf_add_aext(struct inode *inode, struct extent_position *epos, | |||
1748 | 1748 | ||
1749 | if (epos->bh) { | 1749 | if (epos->bh) { |
1750 | aed = (struct allocExtDesc *)epos->bh->b_data; | 1750 | aed = (struct allocExtDesc *)epos->bh->b_data; |
1751 | aed->lengthAllocDescs = | 1751 | le32_add_cpu(&aed->lengthAllocDescs, adsize); |
1752 | cpu_to_le32(le32_to_cpu( | ||
1753 | aed->lengthAllocDescs) + adsize); | ||
1754 | } else { | 1752 | } else { |
1755 | iinfo->i_lenAlloc += adsize; | 1753 | iinfo->i_lenAlloc += adsize; |
1756 | mark_inode_dirty(inode); | 1754 | mark_inode_dirty(inode); |
@@ -1800,9 +1798,7 @@ int8_t udf_add_aext(struct inode *inode, struct extent_position *epos, | |||
1800 | mark_inode_dirty(inode); | 1798 | mark_inode_dirty(inode); |
1801 | } else { | 1799 | } else { |
1802 | aed = (struct allocExtDesc *)epos->bh->b_data; | 1800 | aed = (struct allocExtDesc *)epos->bh->b_data; |
1803 | aed->lengthAllocDescs = | 1801 | le32_add_cpu(&aed->lengthAllocDescs, adsize); |
1804 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) + | ||
1805 | adsize); | ||
1806 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 1802 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
1807 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 1803 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
1808 | udf_update_tag(epos->bh->b_data, | 1804 | udf_update_tag(epos->bh->b_data, |
@@ -2016,9 +2012,7 @@ int8_t udf_delete_aext(struct inode *inode, struct extent_position epos, | |||
2016 | mark_inode_dirty(inode); | 2012 | mark_inode_dirty(inode); |
2017 | } else { | 2013 | } else { |
2018 | aed = (struct allocExtDesc *)oepos.bh->b_data; | 2014 | aed = (struct allocExtDesc *)oepos.bh->b_data; |
2019 | aed->lengthAllocDescs = | 2015 | le32_add_cpu(&aed->lengthAllocDescs, -(2 * adsize)); |
2020 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) - | ||
2021 | (2 * adsize)); | ||
2022 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 2016 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
2023 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 2017 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
2024 | udf_update_tag(oepos.bh->b_data, | 2018 | udf_update_tag(oepos.bh->b_data, |
@@ -2035,9 +2029,7 @@ int8_t udf_delete_aext(struct inode *inode, struct extent_position epos, | |||
2035 | mark_inode_dirty(inode); | 2029 | mark_inode_dirty(inode); |
2036 | } else { | 2030 | } else { |
2037 | aed = (struct allocExtDesc *)oepos.bh->b_data; | 2031 | aed = (struct allocExtDesc *)oepos.bh->b_data; |
2038 | aed->lengthAllocDescs = | 2032 | le32_add_cpu(&aed->lengthAllocDescs, -adsize); |
2039 | cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) - | ||
2040 | adsize); | ||
2041 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || | 2033 | if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || |
2042 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) | 2034 | UDF_SB(inode->i_sb)->s_udfrev >= 0x0201) |
2043 | udf_update_tag(oepos.bh->b_data, | 2035 | udf_update_tag(oepos.bh->b_data, |