diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-04 15:59:49 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-04 16:01:26 -0300 |
commit | c78d218fc5a9995d6b50aa38814bef4fbc88a77d (patch) | |
tree | 8c647466fa60cb281556016388adf0ad80172c8c /fs/ext4/fast_commit.c | |
parent | 0994a1bcd5f7c0bf7ca3b4938d4f0f6928ac7886 (diff) | |
parent | 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff) |
Merge tag 'v5.15-rc4' into rdma.get for-next
Merged due to dependencies in following patches.
Conflict in drivers/infiniband/hw/hfi1/ipoib_tx.c resolved by hand to take
the %p change and txq stats rename together.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'fs/ext4/fast_commit.c')
-rw-r--r-- | fs/ext4/fast_commit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 8e610a381862..8ea5a81e6554 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -892,6 +892,12 @@ static int ext4_fc_write_inode_data(struct inode *inode, u32 *crc) sizeof(lrange), (u8 *)&lrange, crc)) return -ENOSPC; } else { + unsigned int max = (map.m_flags & EXT4_MAP_UNWRITTEN) ? + EXT_UNWRITTEN_MAX_LEN : EXT_INIT_MAX_LEN; + + /* Limit the number of blocks in one extent */ + map.m_len = min(max, map.m_len); + fc_ext.fc_ino = cpu_to_le32(inode->i_ino); ex = (struct ext4_extent *)&fc_ext.fc_ex; ex->ee_block = cpu_to_le32(map.m_lblk); |