From: Robert Love iput() can sleep. Document it. Signed-off-by: Robert Love Signed-off-by: Andrew Morton --- 25-akpm/fs/inode.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -puN fs/inode.c~iput-can-sleep fs/inode.c --- 25/fs/inode.c~iput-can-sleep 2005-03-30 18:02:07.000000000 -0800 +++ 25-akpm/fs/inode.c 2005-03-30 18:02:07.000000000 -0800 @@ -1098,15 +1098,16 @@ static inline void iput_final(struct ino * @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); _