aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2008-04-17 03:47:48 -0400
committerJan Kara <jack@suse.cz>2008-04-17 08:29:56 -0400
commitf845fced913b1437659bb5baf187698547697afe (patch)
treee23244018eeb8a57229ef0f12f69521a50881e14 /fs/udf/inode.c
parent706047a79725b585cf272fdefc234b31b6545c72 (diff)
udf: use crc_itu_t from lib instead of udf_crc
As pointed out by Sergey Vlasov, UDF implements its own version of the CRC ITU-T V.41. Convert it to use the one in the library. Signed-off-by: Bob Copeland <me@bobcopeland.com> Cc: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c11
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 */