linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 1/4] xfs: add asserts for the mmap lock in xfs_{insert,collapse}_file_space
Date: Mon, 23 Oct 2017 08:30:14 +0200	[thread overview]
Message-ID: <20171023063017.11520-2-hch@lst.de> (raw)
In-Reply-To: <20171023063017.11520-1-hch@lst.de>

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_bmap_util.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 034f3429ca8c..170b74c7f2d5 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1334,6 +1334,8 @@ xfs_collapse_file_space(
 	bool			done = false;
 
 	ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
+	ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
+
 	trace_xfs_collapse_file_space(ip);
 
 	error = xfs_free_file_space(ip, offset, len);
@@ -1408,6 +1410,8 @@ xfs_insert_file_space(
 	bool			done = false;
 
 	ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
+	ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
+
 	trace_xfs_insert_file_space(ip);
 
 	error = xfs_prepare_shift(ip, offset);
-- 
2.14.2


  reply	other threads:[~2017-10-23  6:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23  6:30 even more extent mapping cleanups Christoph Hellwig
2017-10-23  6:30 ` Christoph Hellwig [this message]
2017-10-23 15:42   ` [PATCH 1/4] xfs: add asserts for the mmap lock in xfs_{insert,collapse}_file_space Darrick J. Wong
2017-10-23  6:30 ` [PATCH 2/4] xfs: remove xfs_bmbt_validate_extent Christoph Hellwig
2017-10-23 15:41   ` Darrick J. Wong
2017-10-24  7:54     ` Christoph Hellwig
2017-10-25  5:24       ` Darrick J. Wong
2017-10-25  6:19         ` Christoph Hellwig
2017-10-23  6:30 ` [PATCH 3/4] xfs: merge xfs_bmap_read_extents into xfs_iread_extents Christoph Hellwig
2017-10-23 23:19   ` Darrick J. Wong
2017-10-23  6:30 ` [PATCH 4/4] xfs: add a new xfs_iext_lookup_extent_before helper Christoph Hellwig
2017-10-23 23:32   ` Darrick J. Wong

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=20171023063017.11520-2-hch@lst.de \
    --to=hch@lst.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).