All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niu YaWei <niu@clusterfs.com>
To: Jan Kara <jack@suse.cz>, linux-kernel@vger.kernel.org
Subject: [PATCH] possible bug in quota format v2 support
Date: Thu, 31 Mar 2005 21:24:52 +0800	[thread overview]
Message-ID: <424BFA24.6040607@clusterfs.com> (raw)

Hi Jan,

I'm afraid that there is a bug in quota format v2 delete qentry.
(The root block shouldn't be put into free blk list even if there isn't
any entry in quota file, right?)

This one line patch may fix it.

Thanks.

- Niu

--- linux-2.6.7/fs/quota_v2.c   2005-01-21 16:47:34.000000000 +0800
+++ linux-2.6.7-quota-v2/fs/quota_v2.c  2005-03-31 21:08:30.012641840 +0800
@@ -529,7 +529,8 @@ static int remove_tree(struct dquot *dqu
                int i;
                ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0);
                for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++);  /* Block 
got empty? */
-               if (i == V2_DQBLKSIZE) {
+               /* don't put the root block into the free block list */
+               if (i == V2_DQBLKSIZE && *blk != V2_DQTREEOFF) {
                        put_free_dqblk(filp, dquot->dq_type, buf, *blk);
                        *blk = 0;
                }


             reply	other threads:[~2005-03-31 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-31 13:24 Niu YaWei [this message]
2005-03-31 14:21 ` [PATCH] possible bug in quota format v2 support Jan Kara
2005-04-01 12:31   ` Smets Jan

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=424BFA24.6040607@clusterfs.com \
    --to=niu@clusterfs.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.