Re: [PATCH] ext4: fix a bug in ext4_wait_for_tail_page_commit

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

 



On Tue, Sep 17, 2019 at 04:48:14PM +0800, yangerkun wrote:
> No need to wait when offset equals to 0. And it will trigger a bug since
> the latter __ext4_journalled_invalidatepage can free the buffers but leave
> page still dirty.

That's only true if the block size == the page size, no?  If the
offset is zero and the block size is 1k, we still need to wait.
Shouldn't the better fix be:

> -	if (offset > PAGE_SIZE - i_blocksize(inode))
> +	if (offset >= PAGE_SIZE - i_blocksize(inode))

  	   	      		- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux