From: Jeff Liu <jeff.liu@oracle.com>
To: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH] quota: Move down dqptr_sem read after initializing default warn[] type at __dquot_alloc_space().
Date: Wed, 18 Jul 2012 12:12:41 +0800 [thread overview]
Message-ID: <500637B9.7050808@oracle.com> (raw)
Hello,
sb->s_dqout->dqptr_sem is used to serialize ops using quota_info for pointers from inode to dquots.
But for __dquot_alloc_space(), it could be safely moved down after the default warn[] array got initialized IMHO.
Thanks,
-Jeff
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
fs/quota/dquot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 10cbe84..510ae87 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1571,10 +1571,10 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
goto out;
}
- down_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
for (cnt = 0; cnt < MAXQUOTAS; cnt++)
warn[cnt].w_type = QUOTA_NL_NOWARN;
+ down_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
spin_lock(&dq_data_lock);
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
if (!dquots[cnt])
--
1.7.4.1
next reply other threads:[~2012-07-18 4:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 4:12 Jeff Liu [this message]
2012-08-14 13:26 ` [PATCH] quota: Move down dqptr_sem read after initializing default warn[] type at __dquot_alloc_space() 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=500637B9.7050808@oracle.com \
--to=jeff.liu@oracle.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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.