diff options
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r-- | fs/udf/inode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 6e151f170c08..6e74b117aaf0 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/buffer_head.h> | 37 | #include <linux/buffer_head.h> |
38 | #include <linux/writeback.h> | 38 | #include <linux/writeback.h> |
39 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
40 | #include <linux/crc-itu-t.h> | ||
40 | 41 | ||
41 | #include "udf_i.h" | 42 | #include "udf_i.h" |
42 | #include "udf_sb.h" | 43 | #include "udf_sb.h" |
@@ -1419,9 +1420,9 @@ static int udf_update_inode(struct inode *inode, int do_sync) | |||
1419 | iinfo->i_location. | 1420 | iinfo->i_location. |
1420 | logicalBlockNum); | 1421 | logicalBlockNum); |
1421 | use->descTag.descCRCLength = cpu_to_le16(crclen); | 1422 | use->descTag.descCRCLength = cpu_to_le16(crclen); |
1422 | use->descTag.descCRC = cpu_to_le16(udf_crc((char *)use + | 1423 | use->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)use + |
1423 | sizeof(tag), crclen, | 1424 | sizeof(tag), |
1424 | 0)); | 1425 | crclen)); |
1425 | use->descTag.tagChecksum = udf_tag_checksum(&use->descTag); | 1426 | use->descTag.tagChecksum = udf_tag_checksum(&use->descTag); |
1426 | 1427 | ||
1427 | mark_buffer_dirty(bh); | 1428 | mark_buffer_dirty(bh); |
@@ -1584,8 +1585,8 @@ static int udf_update_inode(struct inode *inode, int do_sync) | |||
1584 | crclen += iinfo->i_lenEAttr + iinfo->i_lenAlloc - | 1585 | crclen += iinfo->i_lenEAttr + iinfo->i_lenAlloc - |
1585 | sizeof(tag); | 1586 | sizeof(tag); |
1586 | fe->descTag.descCRCLength = cpu_to_le16(crclen); | 1587 | fe->descTag.descCRCLength = cpu_to_le16(crclen); |
1587 | fe->descTag.descCRC = cpu_to_le16(udf_crc((char *)fe + sizeof(tag), | 1588 | fe->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)fe + sizeof(tag), |
1588 | crclen, 0)); | 1589 | crclen)); |
1589 | fe->descTag.tagChecksum = udf_tag_checksum(&fe->descTag); | 1590 | fe->descTag.tagChecksum = udf_tag_checksum(&fe->descTag); |
1590 | 1591 | ||
1591 | /* write the data blocks */ | 1592 | /* write the data blocks */ |