<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Jan Kara &lt;jack@ucw.cz&gt;

I'm sending you a fix of possible Oops in vfs_quota_sync().  Actually
nobody has run into that I found it when I was looking through the code.



 fs/dquot.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -puN fs/dquot.c~sync_dquots-oops-fix fs/dquot.c
--- 25/fs/dquot.c~sync_dquots-oops-fix	2003-11-24 09:53:31.000000000 -0800
+++ 25-akpm/fs/dquot.c	2003-11-24 09:53:31.000000000 -0800
@@ -192,6 +192,8 @@ static struct list_head dquot_hash[NR_DQ
 
 struct dqstats dqstats;
 
+static void dqput(struct dquot *dquot);
+
 static inline int const hashfn(struct super_block *sb, unsigned int id, int type)
 {
 	return((((unsigned long)sb&gt;&gt;L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type)) % NR_DQHASH;
@@ -339,8 +341,11 @@ restart:
 			continue;
 		if (!dquot_dirty(dquot))
 			continue;
+		atomic_inc(&amp;dquot-&gt;dq_count);
+		dqstats.lookups++;
 		spin_unlock(&amp;dq_list_lock);
 		sb-&gt;dq_op-&gt;sync_dquot(dquot);
+		dqput(dquot);
 		goto restart;
 	}
 	spin_unlock(&amp;dq_list_lock);

_
</pre></body></html>