Messages in this thread Patch in this message | | | Date | Fri, 12 Sep 1997 17:27:47 -0400 | From | Bill Hawes <> | Subject | minor patch for 2.1.55 fs/inode.c |
| |
[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--- 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; | |