From: Tao Ma Date: Wed, 21 Apr 2010 06:05:55 +0000 (+0800) Subject: ocfs2: Update VFS inode's id info after reflink. X-Git-Tag: v2.6.33.4~87 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=76e0dc2e41e9d151ce0364340227dabf5ee479d5;p=karo-tx-linux.git ocfs2: Update VFS inode's id info after reflink. commit c21a534e2f24968cf74976a4e721ac194db30ded upstream. In reflink we update the id info on the disk but forgot to update the corresponding information in the VFS inode. Update them accordingly when we want to preserve the attributes. Reported-by: Jeff Liu Signed-off-by: Tao Ma Signed-off-by: Joel Becker Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 8ae65c9c020c..a8e85720d1f4 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode, di->i_attr = s_di->i_attr; if (preserve) { + t_inode->i_uid = s_inode->i_uid; + t_inode->i_gid = s_inode->i_gid; + t_inode->i_mode = s_inode->i_mode; di->i_uid = s_di->i_uid; di->i_gid = s_di->i_gid; di->i_mode = s_di->i_mode;