From: Xiongwei Song <sxwjean@gmail.com>
To: darrick.wong@oracle.com, linux-xfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
Date: Sun, 24 Dec 2017 20:34:47 +0800 [thread overview]
Message-ID: <20171224123447.2998-1-sxwjean@gmail.com> (raw)
The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when
calling xfs_qm_init_quotainfo, but it was not destroyed before free
xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was
incorrect, so destroy it in function xfs_qm_destroy_quotainfo.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
---
fs/xfs/xfs_qm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index ec952dfad359..deceef5cbbf3 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -737,6 +737,7 @@ xfs_qm_destroy_quotainfo(
qi->qi_pquotaip = NULL;
}
mutex_destroy(&qi->qi_quotaofflock);
+ mutex_destroy(&qi->qi_tree_lock);
kmem_free(qi);
mp->m_quotainfo = NULL;
}
--
2.15.1
next reply other threads:[~2017-12-24 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-24 12:34 Xiongwei Song [this message]
2018-01-02 20:38 ` [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object Darrick J. Wong
2018-01-02 22:29 ` Xiongwei Song
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=20171224123447.2998-1-sxwjean@gmail.com \
--to=sxwjean@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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.