summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_pnfs.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-10-12 18:38:11 +1100
committerDave Chinner <david@fromorbit.com>2015-10-12 18:38:11 +1100
commit8a56d7c305b9613dfe416fd1af06871ec34bb103 (patch)
tree9ba7d6d2d8cca70739194131adde29d2c2398333 /fs/xfs/xfs_pnfs.c
parent316433beda9433697109eb1cd256666f163c7c1f (diff)
parent0a50f162af6ddc2db02c9edc5bbb823c336100a4 (diff)
Merge branch 'xfs-io-fixes' into for-next
Diffstat (limited to 'fs/xfs/xfs_pnfs.c')
-rw-r--r--fs/xfs/xfs_pnfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index ab4a6066f7ca..dc6221942b85 100644
--- a/fs/xfs/xfs_pnfs.c
+++ b/fs/xfs/xfs_pnfs.c
@@ -181,6 +181,11 @@ xfs_fs_map_blocks(
ASSERT(imap.br_startblock != DELAYSTARTBLOCK);
if (!nimaps || imap.br_startblock == HOLESTARTBLOCK) {
+ /*
+ * xfs_iomap_write_direct() expects to take ownership of
+ * the shared ilock.
+ */
+ xfs_ilock(ip, XFS_ILOCK_SHARED);
error = xfs_iomap_write_direct(ip, offset, length,
&imap, nimaps);
if (error)