ChangeSet 1.2273, 2005/03/31 08:40:32-08:00, [EMAIL PROTECTED]

        [PATCH] iput() can sleep
        
        iput() can sleep.  Document it.
        
        Signed-off-by: Robert Love <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 inode.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c        2005-03-31 10:21:03 -08:00
+++ b/fs/inode.c        2005-03-31 10:21:03 -08:00
@@ -1098,15 +1098,16 @@
  *     @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);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to