minor patch for 2.1.55 fs/inode.c

Bill Hawes (whawes@star.net)
Fri, 12 Sep 1997 17:27:47 -0400


This is a multi-part message in MIME format.
--------------7D68E3B65DB4DA2B9DD38497
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

[Sorry, forgot the attachment]

The attached patch fixes a couple of minor inode problems. It adds a
wakeup after clearing I_LOCK following read_inode, and repeats the call
to sync_one in write_inode_now to cover the case of the inode being both
dirty and locked.

BTW, I'm still a little uneasy with clearing I_LOCK without the
spinlock, but I haven't come up with a definite problem. On some
architectures the x &= mask construct would take several instructions;
if I_LOCK were tested from interrupt contexts, could this be a problem?

Regards,
Bill
--------------7D68E3B65DB4DA2B9DD38497
Content-Type: text/plain; charset=us-ascii; name="inode_55-patchette"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="inode_55-patchette"

--- fs/inode.c.old Wed Sep 10 09:21:27 1997
+++ fs/inode.c Fri Sep 12 17:06:21 1997
@@ -224,5 +200,5 @@
if (sb) {
spin_lock(&inode_lock);
- if (inode->i_state & I_DIRTY)
+ while (inode->i_state & I_DIRTY)
sync_one(inode);
spin_unlock(&inode_lock);
@@ -482,4 +584,5 @@
*/
inode->i_state &= ~I_LOCK;
+ wake_up(&inode->i_wait);

return inode;

--------------7D68E3B65DB4DA2B9DD38497--