aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/xattr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 2e3ea308c144..5b8d94436105 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -6499,6 +6499,16 @@ static int ocfs2_reflink_xattr_inline(struct ocfs2_xattr_reflink *args)
6499 } 6499 }
6500 6500
6501 new_oi = OCFS2_I(args->new_inode); 6501 new_oi = OCFS2_I(args->new_inode);
6502 /*
6503 * Adjust extent record count to reserve space for extended attribute.
6504 * Inline data count had been adjusted in ocfs2_duplicate_inline_data().
6505 */
6506 if (!(new_oi->ip_dyn_features & OCFS2_INLINE_DATA_FL) &&
6507 !(ocfs2_inode_is_fast_symlink(args->new_inode))) {
6508 struct ocfs2_extent_list *el = &new_di->id2.i_list;
6509 le16_add_cpu(&el->l_count, -(inline_size /
6510 sizeof(struct ocfs2_extent_rec)));
6511 }
6502 spin_lock(&new_oi->ip_lock); 6512 spin_lock(&new_oi->ip_lock);
6503 new_oi->ip_dyn_features |= OCFS2_HAS_XATTR_FL | OCFS2_INLINE_XATTR_FL; 6513 new_oi->ip_dyn_features |= OCFS2_HAS_XATTR_FL | OCFS2_INLINE_XATTR_FL;
6504 new_di->i_dyn_features = cpu_to_le16(new_oi->ip_dyn_features); 6514 new_di->i_dyn_features = cpu_to_le16(new_oi->ip_dyn_features);