mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix minor quota race
Date: Thu, 1 Jul 2004 15:09:44 -0700	[thread overview]
Message-ID: <20040701150944.19b33862.akpm@osdl.org> (raw)
In-Reply-To: <20040701200740.GE3540@atrey.karlin.mff.cuni.cz>

Jan Kara <jack@suse.cz> wrote:
>
> I'm sending one more quota fix - it fixes a possible race between
> quotaoff and prune_icache. The race could lead to some forgotten
> pointers to quotas in inodes leading later to BUG when invalidating
> quota structures. The patch is against 2.6.7.

It tossed one reject against the lock ranking comment in dquot.c.  I fixed
that up.

I'll apply the below patch on top of it - please always put extern decls in
header files so that the implementor and all users of the data/function
always see the same declaration.



diff -puN fs/dquot.c~fix-minor-quota-race-tweaks fs/dquot.c
--- 25/fs/dquot.c~fix-minor-quota-race-tweaks	Thu Jul  1 15:05:45 2004
+++ 25-akpm/fs/dquot.c	Thu Jul  1 15:06:12 2004
@@ -730,11 +730,6 @@ static void put_dquot_list(struct list_h
 	}
 }
 
-/* Function in inode.c - remove pointers to dquots in icache */
-extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
-
-extern struct semaphore iprune_sem;
-
 /* Gather all references from inodes and drop them */
 static void drop_dquot_ref(struct super_block *sb, int type)
 {
diff -puN include/linux/fs.h~fix-minor-quota-race-tweaks include/linux/fs.h
--- 25/include/linux/fs.h~fix-minor-quota-race-tweaks	Thu Jul  1 15:05:45 2004
+++ 25-akpm/include/linux/fs.h	Thu Jul  1 15:07:08 2004
@@ -1386,6 +1386,8 @@ extern void clear_inode(struct inode *);
 extern void destroy_inode(struct inode *);
 extern struct inode *new_inode(struct super_block *);
 extern int remove_suid(struct dentry *);
+extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
+extern struct semaphore iprune_sem;
 
 extern void __insert_inode_hash(struct inode *, unsigned long hashval);
 extern void remove_inode_hash(struct inode *);
_


  reply	other threads:[~2004-07-01 22:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 20:07 Jan Kara
2004-07-01 22:09 ` Andrew Morton [this message]
2004-07-02  8:21   ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040701150944.19b33862.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®