X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fgfs2%2Fops_inode.c;h=78f73ca1ef3e8ac9ce5af97b43eccec7e8f7be68;hb=f8f484d1b6677dd5cd5e7e605db747e8c30bbd47;hp=247436c10deb853a35f4daf7db90cf18de96099a;hpb=6548698f929814375fa5d62ae1db96959b0418c1;p=~andy%2Flinux diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 247436c10de..78f73ca1ef3 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -748,7 +748,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, struct gfs2_rgrpd *nrgd; unsigned int num_gh; int dir_rename = 0; - int alloc_required; + int alloc_required = 0; unsigned int x; int error; @@ -867,7 +867,9 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, goto out_gunlock; } - alloc_required = error = gfs2_diradd_alloc_required(ndir, &ndentry->d_name); + if (nip == NULL) + alloc_required = gfs2_diradd_alloc_required(ndir, &ndentry->d_name); + error = alloc_required; if (error < 0) goto out_gunlock; error = 0;