]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ocfs2: Update VFS inode's id info after reflink.
authorTao Ma <tao.ma@oracle.com>
Wed, 21 Apr 2010 06:05:55 +0000 (14:05 +0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 23 Apr 2010 21:43:22 +0000 (14:43 -0700)
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 <jeff.liu@oracle.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: <stable@kernel.org>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/refcounttree.c

index 29405f2ff616e6c32ba3488ade4296deec1d5b94..32a8ac589c87f68407e0d90c1a85a22a06f35b1f 100644 (file)
@@ -4084,6 +4084,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;