Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dave Chinner and committed by
Dave Chinner
fe22d552 f19b872b

+7 -1
+5 -1
fs/xfs/libxfs/xfs_bmap.c
··· 973 973 *firstblock = args.fsbno; 974 974 bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); 975 975 976 - /* initialise the block and copy the data */ 976 + /* 977 + * Initialise the block and copy the data 978 + * 979 + * Note: init_fn must set the buffer log item type correctly! 980 + */ 977 981 init_fn(tp, bp, ip, ifp); 978 982 979 983 /* account for the change in fork size and log everything */