summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rw.h
diff options
context:
space:
mode:
authorChristoph Hellwig2009-10-19 06:03:46 +0200
committerAlex Elder2009-12-11 22:11:19 +0100
commitc56c9631cbe88f08854a56ff9776c1f310916830 (patch)
tree9069de0b572857072bc99334b8d5e1bce14ef13f /fs/xfs/xfs_rw.h
parentxfs: simplify inode teardown (diff)
downloadkernel-qcow2-linux-c56c9631cbe88f08854a56ff9776c1f310916830.tar.gz
kernel-qcow2-linux-c56c9631cbe88f08854a56ff9776c1f310916830.tar.xz
kernel-qcow2-linux-c56c9631cbe88f08854a56ff9776c1f310916830.zip
xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
When xfs_free_eofblocks is called from ->release the VM might already hold the mmap_sem, but in the write path we take the iolock before taking the mmap_sem in the generic write code. Switch xfs_free_eofblocks to only trylock the iolock if called from ->release and skip trimming the prellocated blocks in that case. We'll still free them later on the final iput. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rw.h')
-rw-r--r--fs/xfs/xfs_rw.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h
index f5e4874c37d8..726014d1c925 100644
--- a/fs/xfs/xfs_rw.h
+++ b/fs/xfs/xfs_rw.h
@@ -37,13 +37,6 @@ xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
}
/*
- * Flags for xfs_free_eofblocks
- */
-#define XFS_FREE_EOF_LOCK (1<<0)
-#define XFS_FREE_EOF_NOLOCK (1<<1)
-
-
-/*
* helper function to extract extent size hint from inode
*/
STATIC_INLINE xfs_extlen_t