Re: [PATCH 10/10] dax: Remove i_mmap_lock protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 21, 2016 at 02:22:55PM +0100, Jan Kara wrote:
> Currently faults are protected against truncate by filesystem specific
> i_mmap_sem and page lock in case of hole page. Cow faults are protected
> DAX radix tree entry locking. So there's no need for i_mmap_lock in DAX
> code. Remove it.
> 
> Signed-off-by: Jan Kara <jack@xxxxxxx>

Reviewed-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>

> ---
>  fs/dax.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index 2fcf4e8a17c5..a2a370db59b7 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -795,8 +795,6 @@ static int dax_insert_mapping(struct address_space *mapping,
>  	int error;
>  	void *ret;
>  
> -	i_mmap_lock_read(mapping);
> -
>  	if (dax_map_atomic(bdev, &dax) < 0) {
>  		error = PTR_ERR(dax.addr);
>  		goto out;
> @@ -821,7 +819,6 @@ static int dax_insert_mapping(struct address_space *mapping,
>  
>  	error = vm_insert_mixed(vma, vaddr, dax.pfn);
>   out:
> -	i_mmap_unlock_read(mapping);
>  	put_locked_mapping_entry(mapping, vmf->pgoff, entry);
>  	return error;
>  }
> @@ -1063,8 +1060,6 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
>  		truncate_pagecache_range(inode, lstart, lend);
>  	}
>  
> -	i_mmap_lock_read(mapping);
> -
>  	if (!write && !buffer_mapped(&bh) && buffer_uptodate(&bh)) {
>  		spinlock_t *ptl;
>  		pmd_t entry;
> @@ -1162,8 +1157,6 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
>  	}
>  
>   out:
> -	i_mmap_unlock_read(mapping);
> -
>  	return result;
>  
>   fallback:
> -- 
> 2.6.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux