aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Love <rml@novell.com>2005-03-30 16:40:32 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:40:32 -0800
commit540ab745282dfb4f87ab81994a12673f0f99cf68 (patch)
tree244e9c7d0e1021e3bf1b056183c1e334a0fd350a
parent821c2ed6e2df804039b994c52615fd6bc756c8ab (diff)
downloadhistory-540ab745282dfb4f87ab81994a12673f0f99cf68.tar.gz
[PATCH] iput() can sleep
iput() can sleep. Document it. Signed-off-by: Robert Love <rml@novell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/inode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index ff654a26833128..90025a39a789f5 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1098,15 +1098,16 @@ static inline void iput_final(struct inode *inode)
* @inode: inode to put
*
* Puts an inode, dropping its usage count. If the inode use count hits
- * zero the inode is also then freed and may be destroyed.
+ * zero, the inode is then freed and may also be destroyed.
+ *
+ * Consequently, iput() can sleep.
*/
void iput(struct inode *inode)
{
if (inode) {
struct super_operations *op = inode->i_sb->s_op;
- if (inode->i_state == I_CLEAR)
- BUG();
+ BUG_ON(inode->i_state == I_CLEAR);
if (op && op->put_inode)
op->put_inode(inode);