diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-26 17:38:49 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-27 13:36:17 +0200 |
commit | 087498eea02acae08627e310d58ec837a54752d7 (patch) | |
tree | 257ba8e7a78d04d9cf6283b271520724bfa19e1f /mm | |
parent | 7715da0b24745db15637f9d380f65386e3d9478b (diff) | |
download | lwn-087498eea02acae08627e310d58ec837a54752d7.tar.gz lwn-087498eea02acae08627e310d58ec837a54752d7.zip |
fs: Convert i_alloc_sem to rw_anon_semaphore
i_alloc_sem is used as a completion in direct-io which does not follow
owner rules. preempt-rt needs to keep it as such. So convert it to
rw_anon_semaphore and annotate the semantics hereby.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 65216194eb8d..96074b2dafcb 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2479,12 +2479,12 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end) return -ENOSYS; mutex_lock(&inode->i_mutex); - down_write(&inode->i_alloc_sem); + anon_down_write(&inode->i_alloc_sem); unmap_mapping_range(mapping, offset, (end - offset), 1); truncate_inode_pages_range(mapping, offset, end); unmap_mapping_range(mapping, offset, (end - offset), 1); inode->i_op->truncate_range(inode, offset, end); - up_write(&inode->i_alloc_sem); + anon_up_write(&inode->i_alloc_sem); mutex_unlock(&inode->i_mutex); return 0; |