Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46322
b: refs/heads/master
c: 549ae0a
h: refs/heads/master
v: v3
  • Loading branch information
Wendy Cheng authored and Steven Whitehouse committed Feb 6, 2007
1 parent 9be06ec commit 87e7406
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: a34fbc6363256387372331000462691bc4b3f5a9
refs/heads/master: 549ae0ac3d574a682e82b02e79259a65445a675b
16 changes: 11 additions & 5 deletions trunk/fs/gfs2/ops_dentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
struct gfs2_inum_host inum;
unsigned int type;
int error;
int had_lock=0;

if (inode && is_bad_inode(inode))
goto invalid;

if (sdp->sd_args.ar_localcaching)
goto valid;

error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh);
if (error)
goto fail;
had_lock = gfs2_glock_is_locked_by_me(dip->i_gl);
if (!had_lock) {
error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh);
if (error)
goto fail;
}

error = gfs2_dir_search(parent->d_inode, &dentry->d_name, &inum, &type);
switch (error) {
Expand All @@ -82,13 +86,15 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
}

valid_gunlock:
gfs2_glock_dq_uninit(&d_gh);
if (!had_lock)
gfs2_glock_dq_uninit(&d_gh);
valid:
dput(parent);
return 1;

invalid_gunlock:
gfs2_glock_dq_uninit(&d_gh);
if (!had_lock)
gfs2_glock_dq_uninit(&d_gh);
invalid:
if (inode && S_ISDIR(inode->i_mode)) {
if (have_submounts(dentry))
Expand Down

0 comments on commit 87e7406

Please sign in to comment.