Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164353
b: refs/heads/master
c: 580be08
h: refs/heads/master
i:
  164351: 32bac53
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Sep 22, 2009
1 parent 95fbf93 commit ac75082
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 5be461657be65460ad92be3527e3bb1dd11c49ea
refs/heads/master: 580be0837a7a59b207c3d5c661d044d8dd0a6a30
14 changes: 8 additions & 6 deletions trunk/fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,15 @@ void unlock_new_inode(struct inode *inode)
}
#endif
/*
* This is special! We do not need the spinlock
* when clearing I_LOCK, because we're guaranteed
* that nobody else tries to do anything about the
* state of the inode when it is locked, as we
* just created it (so there can be no old holders
* that haven't tested I_LOCK).
* This is special! We do not need the spinlock when clearing I_LOCK,
* because we're guaranteed that nobody else tries to do anything about
* the state of the inode when it is locked, as we just created it (so
* there can be no old holders that haven't tested I_LOCK).
* However we must emit the memory barrier so that other CPUs reliably
* see the clearing of I_LOCK after the other inode initialisation has
* completed.
*/
smp_mb();
WARN_ON((inode->i_state & (I_LOCK|I_NEW)) != (I_LOCK|I_NEW));
inode->i_state &= ~(I_LOCK|I_NEW);
wake_up_inode(inode);
Expand Down

0 comments on commit ac75082

Please sign in to comment.