aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
commitc5e40ee287db61a79af1746954ee03ebbf1ff8a3 (patch)
tree007da00e75e9b84766ac4868421705300e1e2e14 /fs/udf/inode.c
parent052831879945be0d9fad2216b127147c565ec1b1 (diff)
parentc5dfd654d0ec0a28fe81e7bd4d4fd984a9855e09 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/bridge/br_mdb.c br_mdb.c conflict was a function call being removed to fix a bug in 'net' but whose signature was changed in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 6afac3d561ac..8d0b3ade0ff0 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1652,17 +1652,9 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1652 iinfo->i_ext.i_data, inode->i_sb->s_blocksize - 1652 iinfo->i_ext.i_data, inode->i_sb->s_blocksize -
1653 sizeof(struct unallocSpaceEntry)); 1653 sizeof(struct unallocSpaceEntry));
1654 use->descTag.tagIdent = cpu_to_le16(TAG_IDENT_USE); 1654 use->descTag.tagIdent = cpu_to_le16(TAG_IDENT_USE);
1655 use->descTag.tagLocation = 1655 crclen = sizeof(struct unallocSpaceEntry);
1656 cpu_to_le32(iinfo->i_location.logicalBlockNum);
1657 crclen = sizeof(struct unallocSpaceEntry) +
1658 iinfo->i_lenAlloc - sizeof(struct tag);
1659 use->descTag.descCRCLength = cpu_to_le16(crclen);
1660 use->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)use +
1661 sizeof(struct tag),
1662 crclen));
1663 use->descTag.tagChecksum = udf_tag_checksum(&use->descTag);
1664 1656
1665 goto out; 1657 goto finish;
1666 } 1658 }
1667 1659
1668 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET)) 1660 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_FORGET))
@@ -1782,6 +1774,8 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1782 efe->descTag.tagIdent = cpu_to_le16(TAG_IDENT_EFE); 1774 efe->descTag.tagIdent = cpu_to_le16(TAG_IDENT_EFE);
1783 crclen = sizeof(struct extendedFileEntry); 1775 crclen = sizeof(struct extendedFileEntry);
1784 } 1776 }
1777
1778finish:
1785 if (iinfo->i_strat4096) { 1779 if (iinfo->i_strat4096) {
1786 fe->icbTag.strategyType = cpu_to_le16(4096); 1780 fe->icbTag.strategyType = cpu_to_le16(4096);
1787 fe->icbTag.strategyParameter = cpu_to_le16(1); 1781 fe->icbTag.strategyParameter = cpu_to_le16(1);
@@ -1791,7 +1785,9 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1791 fe->icbTag.numEntries = cpu_to_le16(1); 1785 fe->icbTag.numEntries = cpu_to_le16(1);
1792 } 1786 }
1793 1787
1794 if (S_ISDIR(inode->i_mode)) 1788 if (iinfo->i_use)
1789 fe->icbTag.fileType = ICBTAG_FILE_TYPE_USE;
1790 else if (S_ISDIR(inode->i_mode))
1795 fe->icbTag.fileType = ICBTAG_FILE_TYPE_DIRECTORY; 1791 fe->icbTag.fileType = ICBTAG_FILE_TYPE_DIRECTORY;
1796 else if (S_ISREG(inode->i_mode)) 1792 else if (S_ISREG(inode->i_mode))
1797 fe->icbTag.fileType = ICBTAG_FILE_TYPE_REGULAR; 1793 fe->icbTag.fileType = ICBTAG_FILE_TYPE_REGULAR;
@@ -1828,7 +1824,6 @@ static int udf_update_inode(struct inode *inode, int do_sync)
1828 crclen)); 1824 crclen));
1829 fe->descTag.tagChecksum = udf_tag_checksum(&fe->descTag); 1825 fe->descTag.tagChecksum = udf_tag_checksum(&fe->descTag);
1830 1826
1831out:
1832 set_buffer_uptodate(bh); 1827 set_buffer_uptodate(bh);
1833 unlock_buffer(bh); 1828 unlock_buffer(bh);
1834 1829