Message ID | 67dd6f0e69c59a8554d7a2977939f94221af00c1.1644994950.git.wqu@suse.com |
---|---|
State | New |
Headers | show |
Series | [for,v5.15,1/2] btrfs: don't hold CPU for too long when defragging a file | expand |
On 2022/2/18 03:48, Greg KH wrote: > On Thu, Feb 17, 2022 at 08:41:51PM +0100, Holger Hoffstätte wrote: >> On 2022-02-17 20:01, Greg KH wrote: >>> On Wed, Feb 16, 2022 at 03:09:07PM +0800, Qu Wenruo wrote: >>>> commit 2d192fc4c1abeb0d04d1c8cd54405ff4a0b0255b upstream. >>> >>> This commit is already in 5.15.22. >> >> It most certainly is not > > Commit 2d192fc4c1abeb0d04d1c8cd54405ff4a0b0255b is in 5.15.22. > >> since it applies cleanly in 5.15.24. >> The correct upstream commit of this patch is ea0eba69a2a8125229b1b6011644598039bc53aa > > Ah, no wonder the confusion. For obvious reasons, I can not take this > as-is :) My bad, wrong commit hash... > > thanks, > > greg k-h
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 6a863b3f6de0..38a1b68c7851 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1581,6 +1581,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, last_len = 0; } } + cond_resched(); } ret = defrag_count;