diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/inode.c b/fs/inode.c index 722860b323a9..71fe079ca32a 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -317,7 +317,7 @@ void clear_inode(struct inode *inode) | |||
317 | bd_forget(inode); | 317 | bd_forget(inode); |
318 | if (S_ISCHR(inode->i_mode) && inode->i_cdev) | 318 | if (S_ISCHR(inode->i_mode) && inode->i_cdev) |
319 | cd_forget(inode); | 319 | cd_forget(inode); |
320 | inode->i_state = I_CLEAR; | 320 | inode->i_state = I_FREEING | I_CLEAR; |
321 | } | 321 | } |
322 | EXPORT_SYMBOL(clear_inode); | 322 | EXPORT_SYMBOL(clear_inode); |
323 | 323 | ||
@@ -553,7 +553,7 @@ repeat: | |||
553 | continue; | 553 | continue; |
554 | if (!test(inode, data)) | 554 | if (!test(inode, data)) |
555 | continue; | 555 | continue; |
556 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) { | 556 | if (inode->i_state & (I_FREEING|I_WILL_FREE)) { |
557 | __wait_on_freeing_inode(inode); | 557 | __wait_on_freeing_inode(inode); |
558 | goto repeat; | 558 | goto repeat; |
559 | } | 559 | } |
@@ -578,7 +578,7 @@ repeat: | |||
578 | continue; | 578 | continue; |
579 | if (inode->i_sb != sb) | 579 | if (inode->i_sb != sb) |
580 | continue; | 580 | continue; |
581 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) { | 581 | if (inode->i_state & (I_FREEING|I_WILL_FREE)) { |
582 | __wait_on_freeing_inode(inode); | 582 | __wait_on_freeing_inode(inode); |
583 | goto repeat; | 583 | goto repeat; |
584 | } | 584 | } |
@@ -840,7 +840,7 @@ EXPORT_SYMBOL(iunique); | |||
840 | struct inode *igrab(struct inode *inode) | 840 | struct inode *igrab(struct inode *inode) |
841 | { | 841 | { |
842 | spin_lock(&inode_lock); | 842 | spin_lock(&inode_lock); |
843 | if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE))) | 843 | if (!(inode->i_state & (I_FREEING|I_WILL_FREE))) |
844 | __iget(inode); | 844 | __iget(inode); |
845 | else | 845 | else |
846 | /* | 846 | /* |
@@ -1089,7 +1089,7 @@ int insert_inode_locked(struct inode *inode) | |||
1089 | continue; | 1089 | continue; |
1090 | if (old->i_sb != sb) | 1090 | if (old->i_sb != sb) |
1091 | continue; | 1091 | continue; |
1092 | if (old->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) | 1092 | if (old->i_state & (I_FREEING|I_WILL_FREE)) |
1093 | continue; | 1093 | continue; |
1094 | break; | 1094 | break; |
1095 | } | 1095 | } |
@@ -1128,7 +1128,7 @@ int insert_inode_locked4(struct inode *inode, unsigned long hashval, | |||
1128 | continue; | 1128 | continue; |
1129 | if (!test(old, data)) | 1129 | if (!test(old, data)) |
1130 | continue; | 1130 | continue; |
1131 | if (old->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) | 1131 | if (old->i_state & (I_FREEING|I_WILL_FREE)) |
1132 | continue; | 1132 | continue; |
1133 | break; | 1133 | break; |
1134 | } | 1134 | } |
@@ -1218,7 +1218,7 @@ void generic_delete_inode(struct inode *inode) | |||
1218 | hlist_del_init(&inode->i_hash); | 1218 | hlist_del_init(&inode->i_hash); |
1219 | spin_unlock(&inode_lock); | 1219 | spin_unlock(&inode_lock); |
1220 | wake_up_inode(inode); | 1220 | wake_up_inode(inode); |
1221 | BUG_ON(inode->i_state != I_CLEAR); | 1221 | BUG_ON(inode->i_state != (I_FREEING | I_CLEAR)); |
1222 | destroy_inode(inode); | 1222 | destroy_inode(inode); |
1223 | } | 1223 | } |
1224 | EXPORT_SYMBOL(generic_delete_inode); | 1224 | EXPORT_SYMBOL(generic_delete_inode); |
@@ -1322,7 +1322,7 @@ static inline void iput_final(struct inode *inode) | |||
1322 | void iput(struct inode *inode) | 1322 | void iput(struct inode *inode) |
1323 | { | 1323 | { |
1324 | if (inode) { | 1324 | if (inode) { |
1325 | BUG_ON(inode->i_state == I_CLEAR); | 1325 | BUG_ON(inode->i_state & I_CLEAR); |
1326 | 1326 | ||
1327 | if (atomic_dec_and_lock(&inode->i_count, &inode_lock)) | 1327 | if (atomic_dec_and_lock(&inode->i_count, &inode_lock)) |
1328 | iput_final(inode); | 1328 | iput_final(inode); |