Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7615
b: refs/heads/master
c: ba403ab
h: refs/heads/master
i:
  7613: 1cecb1b
  7611: b30eb69
  7607: 174ba9c
  7599: a0e8f58
  7583: 84c99a6
  7551: 3a74a2c
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Sep 4, 2005
1 parent 65efde9 commit 7d956d5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 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: efa092f3d4c60be7e81de515db9f06e5f8426afc
refs/heads/master: ba403ab43e896c57f32995ccba9a6bd6ec8dd1b9
28 changes: 16 additions & 12 deletions trunk/fs/xfs/xfs_iget.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/

#include <linux/delay.h>

#include "xfs.h"

#include "xfs_macros.h"
Expand Down Expand Up @@ -507,14 +509,13 @@ xfs_iget(

XFS_STATS_INC(xs_ig_attempts);

retry:
if ((inode = iget_locked(XFS_MTOVFS(mp)->vfs_super, ino))) {
bhv_desc_t *bdp;
xfs_inode_t *ip;
int newnode;

vp = LINVFS_GET_VP(inode);
if (inode->i_state & I_NEW) {
inode_allocate:
vn_initialize(inode);
error = xfs_iget_core(vp, mp, tp, ino, flags,
lock_flags, ipp, bno);
Expand All @@ -525,22 +526,25 @@ xfs_iget(
iput(inode);
}
} else {
if (is_bad_inode(inode)) {
/*
* If the inode is not fully constructed due to
* filehandle mistmatches wait for the inode to go
* away and try again.
*
* iget_locked will call __wait_on_freeing_inode
* to wait for the inode to go away.
*/
if (is_bad_inode(inode) ||
((bdp = vn_bhv_lookup(VN_BHV_HEAD(vp),
&xfs_vnodeops)) == NULL)) {
iput(inode);
return EIO;
delay(1);
goto retry;
}

bdp = vn_bhv_lookup(VN_BHV_HEAD(vp), &xfs_vnodeops);
if (bdp == NULL) {
XFS_STATS_INC(xs_ig_dup);
goto inode_allocate;
}
ip = XFS_BHVTOI(bdp);
if (lock_flags != 0)
xfs_ilock(ip, lock_flags);
newnode = (ip->i_d.di_mode == 0);
if (newnode)
xfs_iocore_inode_reinit(ip);
XFS_STATS_INC(xs_ig_found);
*ipp = ip;
error = 0;
Expand Down

0 comments on commit 7d956d5

Please sign in to comment.