Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / fs / gfs2 / inode.c
index 8108b4f0354ce8aab3d9a3e010687ed2f0688454..c4ed823d150e9609529ef1789874801180bcd4d9 100644 (file)
@@ -600,7 +600,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
        int error, free_vfs_inode = 0;
        u32 aflags = 0;
        unsigned blocks = 1;
-       struct gfs2_diradd da = { .bh = NULL, };
+       struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
 
        if (!name->len || name->len > GFS2_FNAMESIZE)
                return -ENAMETOOLONG;
@@ -672,6 +672,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        gfs2_set_inode_blocks(inode, 1);
        munge_mode_uid_gid(dip, inode);
+       check_and_update_goal(dip);
        ip->i_goal = dip->i_goal;
        ip->i_diskflags = 0;
        ip->i_eattr = 0;
@@ -899,7 +900,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
        struct gfs2_inode *ip = GFS2_I(inode);
        struct gfs2_holder ghs[2];
        struct buffer_head *dibh;
-       struct gfs2_diradd da = { .bh = NULL, };
+       struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
        int error;
 
        if (S_ISDIR(inode->i_mode))
@@ -1342,7 +1343,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
        struct gfs2_rgrpd *nrgd;
        unsigned int num_gh;
        int dir_rename = 0;
-       struct gfs2_diradd da = { .nr_blocks = 0, };
+       struct gfs2_diradd da = { .nr_blocks = 0, .save_loc = 0, };
        unsigned int x;
        int error;