lkml.org 
[lkml]   [1997]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectminor 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;
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.039 / U:4.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site