summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorDave Chinner2015-01-21 23:30:06 +0100
committerDave Chinner2015-01-21 23:30:06 +0100
commitfe22d552b82d7cc7de1851233ae8bef579198637 (patch)
tree106482e8bd9a8567a0754c59d5fc38d3cb9a577b /fs/xfs/libxfs/xfs_bmap.c
parentxfs: inode unlink does not set AGI buffer type (diff)
downloadkernel-qcow2-linux-fe22d552b82d7cc7de1851233ae8bef579198637.tar.gz
kernel-qcow2-linux-fe22d552b82d7cc7de1851233ae8bef579198637.tar.xz
kernel-qcow2-linux-fe22d552b82d7cc7de1851233ae8bef579198637.zip
xfs: set buf types when converting extent formats
Conversion from local to extent format does not set the buffer type correctly on the new extent buffer when a symlink data is moved out of line. Fix the symlink code and leave a comment in the generic bmap code reminding us that the format-specific data copy needs to set the destination buffer type appropriately. cc: <stable@vger.kernel.org> # 3.10 to current Tested-by: Jan Kara <jack@suse.cz> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index b5eb4743f75a..4e20fe7497b3 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -973,7 +973,11 @@ xfs_bmap_local_to_extents(
*firstblock = args.fsbno;
bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0);
- /* initialise the block and copy the data */
+ /*
+ * Initialise the block and copy the data
+ *
+ * Note: init_fn must set the buffer log item type correctly!
+ */
init_fn(tp, bp, ip, ifp);
/* account for the change in fork size and log everything */