Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124778
b: refs/heads/master
c: f338f90
h: refs/heads/master
v: v3
  • Loading branch information
Lachlan McIlroy committed Oct 30, 2008
1 parent 3919a05 commit 9168d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: a357a1215602f79182abdde27aaddc7166dbd709
refs/heads/master: f338f9036400e453ab553b16639a9cc838b02d44
9 changes: 6 additions & 3 deletions trunk/fs/xfs/xfs_iget.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ xfs_iget_core(

xfs_itrace_exit_tag(ip, "xfs_iget.alloc");

if (lock_flags)
xfs_ilock(ip, lock_flags);

if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) {
xfs_idestroy(ip);
xfs_put_perag(mp, pag);
Expand All @@ -228,6 +225,10 @@ xfs_iget_core(
delay(1);
goto again;
}

if (lock_flags)
xfs_ilock(ip, lock_flags);

mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1);
first_index = agino & mask;
write_lock(&pag->pag_ici_lock);
Expand All @@ -239,6 +240,8 @@ xfs_iget_core(
BUG_ON(error != -EEXIST);
write_unlock(&pag->pag_ici_lock);
radix_tree_preload_end();
if (lock_flags)
xfs_iunlock(ip, lock_flags);
xfs_idestroy(ip);
XFS_STATS_INC(xs_ig_dup);
goto again;
Expand Down

0 comments on commit 9168d8c

Please sign in to comment.