diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-08 08:55:43 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-08 08:55:46 +0100 |
commit | 6d3e0907b8b239d16720d144e2675ecf10d3bc3b (patch) | |
tree | e0b0743b5f6f82b057cafc4f3687396a6e01a0b4 /fs/gfs2/ops_inode.c | |
parent | 23577256953c870de9b724c3a2611ce7be6a1e4e (diff) | |
parent | 50200df462023b187d80a99a52f5f2cfe3c86c26 (diff) |
Merge branch 'sched/urgent' into sched/core
Merge reason: Merge dependent fix, update to latest -rc.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 247436c10deb..84350e1be66d 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; @@ -1086,7 +1088,8 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) error = vfs_follow_link(nd, buf); if (buf != array) kfree(buf); - } + } else + path_put(&nd->path); return ERR_PTR(error); } |