Re: [PATCH 1/5] Btrfs: use correct count in btrfs_file_write_iter()

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

 



On Thu, Aug 15, 2019 at 02:04:02PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@xxxxxx>
> 
> generic_write_checks() may modify iov_iter_count(), so we must get the
> count after the call, not before. Using the wrong one has a couple of
> consequences:
> 
> 1. We check a longer range in check_can_nocow() for nowait than we're
>    actually writing.
> 2. We create extra hole extent maps in btrfs_cont_expand(). As far as I
>    can tell, this is harmless, but I might be missing something.
> 
> These issues are pretty minor, but let's fix it before something more
> important trips on it.
> 
> Fixes: edf064e7c6fe ("btrfs: nowait aio support")
> Signed-off-by: Omar Sandoval <osandov@xxxxxx>

Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>

Thanks,

Josef



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux