lkml.org 
[lkml]   [2001]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] (9/11) fs/super.c fixes

Part 9/11

Cleanup: invalidate_dquot() can rely on the fact that struct superblock is
not reused.

diff -urN S9-pre3-kern_mnt/fs/dquot.c S9-pre3-dquot/fs/dquot.c
--- S9-pre3-kern_mnt/fs/dquot.c Sat Aug 11 14:59:24 2001
+++ S9-pre3-dquot/fs/dquot.c Mon Aug 13 21:21:28 2001
@@ -325,7 +325,7 @@
memset(&dquot->dq_dqb, 0, sizeof(struct dqblk));
}

-static void invalidate_dquots(kdev_t dev, short type)
+static void invalidate_dquots(struct super_block *sb, short type)
{
struct dquot *dquot, *next;
int need_restart;
@@ -335,12 +335,10 @@
need_restart = 0;
while ((dquot = next) != NULL) {
next = dquot->dq_next;
- if (dquot->dq_dev != dev)
+ if (dquot->dq_sb != sb)
continue;
if (dquot->dq_type != type)
continue;
- if (!dquot->dq_sb) /* Already invalidated entry? */
- continue;
if (dquot->dq_flags & DQ_LOCKED) {
__wait_on_dquot(dquot);

@@ -349,12 +347,10 @@
/*
* Make sure it's still the same dquot.
*/
- if (dquot->dq_dev != dev)
+ if (dquot->dq_sb != sb)
continue;
if (dquot->dq_type != type)
continue;
- if (!dquot->dq_sb)
- continue;
}
/*
* Because inodes needn't to be the only holders of dquot
@@ -1409,7 +1405,7 @@

/* Note: these are blocking operations */
remove_dquot_ref(sb, cnt);
- invalidate_dquots(sb->s_dev, cnt);
+ invalidate_dquots(sb, cnt);

/* Wait for any pending IO - remove me as soon as invalidate is more polite */
down(&dqopt->dqio_sem);

-
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/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.073 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site