Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Mon, 24 Nov 2003 10:38:59 +0100 | From | Jan Kara <> | Subject | [PATCH] Fix possible oops in sync_dquots |
| |
Hi Andrew,
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... The patch is against -test9 but should apply against -test10 too. Please apply.
Honza
PS: Linus, if you find it interesting for your patch queue then apply too :)...
diff -ruX ../kerndiffexclude linux-2.6.0-test9-um/fs/dquot.c linux-2.6.0-test9-syncfix/fs/dquot.c --- linux-2.6.0-test9-um/fs/dquot.c Thu Nov 6 19:10:37 2003 +++ linux-2.6.0-test9-syncfix/fs/dquot.c Mon Nov 24 10:31:41 2003 @@ -192,6 +192,8 @@ 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 @@ 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); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |