xfs
[Top] [All Lists]

page_buf_locking module use count bug

To: linux-xfs@xxxxxxxxxxx
Subject: page_buf_locking module use count bug
From: ivanr@xxxxxxxxxxxxxxxxx
Date: Tue, 11 Apr 2000 14:27:23 +1000
Sender: owner-linux-xfs@xxxxxxxxxxx
For whoever knows about this code:

Got into a situation where the use count for the page_buf_locking
module was greater than zero, even though the xfs module had been
unloaded, and therefore I am unable to unload the module.  A quick
look around, found this:

xfs_super.c:
  void
  linvfs_release_inode(struct inode *inode)
  {
        if (inode) {
                pagebuf_lock_disable(inode);
                truncate_inode_pages(&inode->i_data, 0L);
                iput(inode);
        }
  }

however, pagebuf_lock_disable() in page_buf_locking.c can return with
-EBUSY without decrementing the use count.

The call to pagebuf_lock_disable() should probably be in a loop
checking the return value, but I wasn't sure whether this would be
safe...


Ivan

-- 
Ivan Rayner
ivanr@xxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>