From: Jan Kara <jack@ucw.cz>

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>>L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type)) % NR_DQHASH;
@@ -339,8 +341,11 @@ restart:
 			continue;
 		if (!dquot_dirty(dquot))
 			continue;
+		atomic_inc(&dquot->dq_count);
+		dqstats.lookups++;
 		spin_unlock(&dq_list_lock);
 		sb->dq_op->sync_dquot(dquot);
+		dqput(dquot);
 		goto restart;
 	}
 	spin_unlock(&dq_list_lock);

_