Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38689
b: refs/heads/master
c: 64c14ea
h: refs/heads/master
i:
  38687: 3b7ea54
v: v3
  • Loading branch information
Steven Whitehouse committed May 16, 2006
1 parent 9962bb9 commit 38406be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 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: b9cb981310bc22f165726e99385c2d85196e2f41
refs/heads/master: 64c14ea73b58e2c3759682d67eeb00d088355f08
22 changes: 6 additions & 16 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,13 @@ static int inode_create(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
if (!ip)
return -ENOMEM;
memset(ip, 0, sizeof(struct gfs2_inode));

ip->i_num = *inum;

atomic_set(&ip->i_count, 1);

ip->i_vn = i_gl->gl_vn - 1;

ip->i_gl = i_gl;
ip->i_sbd = sdp;

spin_lock_init(&ip->i_spin);
init_rwsem(&ip->i_rw_mutex);

ip->i_greedy = gfs2_tune_get(sdp, gt_greedy_default);

if (need_lock) {
Expand All @@ -318,27 +312,23 @@ static int inode_create(struct gfs2_glock *i_gl, const struct gfs2_inum *inum,
&ip->i_iopen_gh);
if (error)
goto fail;
}

spin_lock(&io_gl->gl_spin);
gfs2_glock_hold(i_gl);
io_gl->gl_object = i_gl;
spin_unlock(&io_gl->gl_spin);
spin_lock(&io_gl->gl_spin);
gfs2_glock_hold(i_gl);
io_gl->gl_object = i_gl;
spin_unlock(&io_gl->gl_spin);
}

gfs2_glock_hold(i_gl);
i_gl->gl_object = ip;

atomic_inc(&sdp->sd_inode_count);

*ipp = ip;

return 0;

fail:
fail:
gfs2_meta_cache_flush(ip);
kmem_cache_free(gfs2_inode_cachep, ip);
*ipp = NULL;

return error;
}

Expand Down

0 comments on commit 38406be

Please sign in to comment.