Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38721
b: refs/heads/master
c: d9d1ca3
h: refs/heads/master
i:
  38719: 6b1cf44
v: v3
  • Loading branch information
Steven Whitehouse committed Jun 21, 2006
1 parent a3f3893 commit 5bf695d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf9f424d9acf461fabcb0e9f47b356e08186d91f
refs/heads/master: d9d1ca30505c6fed867e1724b16fdad0c281d7d1
16 changes: 11 additions & 5 deletions trunk/fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,13 +615,19 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
goto out_gunlock_r;
}

num_gh = 1;
gfs2_holder_init(odip->i_gl, LM_ST_EXCLUSIVE, 0, ghs);
gfs2_holder_init(ndip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1);
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 2);
num_gh = 3;
if (odip != ndip) {
gfs2_holder_init(ndip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + num_gh);
num_gh++;
}
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + num_gh);
num_gh++;

if (nip)
gfs2_holder_init(nip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + num_gh++);
if (nip) {
gfs2_holder_init(nip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + num_gh);
num_gh++;
}

error = gfs2_glock_nq_m(num_gh, ghs);
if (error)
Expand Down

0 comments on commit 5bf695d

Please sign in to comment.