Re: [PATCH 06/10] dax: Remove redundant inode size checks

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

 



On Mon, Mar 21, 2016 at 02:22:51PM +0100, Jan Kara wrote:
> Callers of dax fault handlers must make sure these calls cannot race
> with truncate. Thus it is enough to check inode size when entering the
> function and we don't have to recheck it again later in the handler.
> Note that inode size itself can be decreased while the fault handler
> runs but filesystem locking prevents against any radix tree or block
> mapping information changes resulting from the truncate and that is what
> we really care about.
> 
> Signed-off-by: Jan Kara <jack@xxxxxxx>
> ---
>  fs/dax.c | 59 +----------------------------------------------------------
>  1 file changed, 1 insertion(+), 58 deletions(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index 50d81172438b..0329ec0bee2e 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -316,20 +316,12 @@ EXPORT_SYMBOL_GPL(dax_do_io);
>  static int dax_load_hole(struct address_space *mapping, struct page *page,
>  							struct vm_fault *vmf)
>  {
> -	unsigned long size;
>  	struct inode *inode = mapping->host;

'inode' is also unused after this patch, and can be removed.

Otherwise the rest of this patch looks good to me, though Matthew might see
more as he was the original author of this code.

Reviewed-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
--
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