aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2016-12-04 20:31:31 -0500
committerDave Chinner <david@fromorbit.com>2016-12-04 20:31:31 -0500
commit200237d6746faaeaf7f4ff4abbf13f3917cee60a (patch)
treece673685afb42bc407116ef7c051ef2364649928 /fs/xfs/xfs_inode.c
parent6b10b23ca94451fae153a5cc8d62fd721bec2019 (diff)
xfs: Move AGI buffer type setting to xfs_read_agi
We've missed properly setting the buffer type for an AGI transaction in 3 spots now, so just move it into xfs_read_agi() and set it if we are in a transaction to avoid the problem in the future. This is similar to how it is done in i.e. the dir3 and attr3 read functions. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 4e560e6a12c1..512ff13ed66a 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2041,7 +2041,6 @@ xfs_iunlink(
2041 agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); 2041 agi->agi_unlinked[bucket_index] = cpu_to_be32(agino);
2042 offset = offsetof(xfs_agi_t, agi_unlinked) + 2042 offset = offsetof(xfs_agi_t, agi_unlinked) +
2043 (sizeof(xfs_agino_t) * bucket_index); 2043 (sizeof(xfs_agino_t) * bucket_index);
2044 xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
2045 xfs_trans_log_buf(tp, agibp, offset, 2044 xfs_trans_log_buf(tp, agibp, offset,
2046 (offset + sizeof(xfs_agino_t) - 1)); 2045 (offset + sizeof(xfs_agino_t) - 1));
2047 return 0; 2046 return 0;
@@ -2133,7 +2132,6 @@ xfs_iunlink_remove(
2133 agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); 2132 agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino);
2134 offset = offsetof(xfs_agi_t, agi_unlinked) + 2133 offset = offsetof(xfs_agi_t, agi_unlinked) +
2135 (sizeof(xfs_agino_t) * bucket_index); 2134 (sizeof(xfs_agino_t) * bucket_index);
2136 xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
2137 xfs_trans_log_buf(tp, agibp, offset, 2135 xfs_trans_log_buf(tp, agibp, offset,
2138 (offset + sizeof(xfs_agino_t) - 1)); 2136 (offset + sizeof(xfs_agino_t) - 1));
2139 } else { 2137 } else {