Re: [PATCH] generic/736: don't run it on tmpfs

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





在 2024/7/29 22:21, Christoph Hellwig 写道:
On Mon, Jul 29, 2024 at 09:53:52PM +0800, yangerkun wrote:
But after commit a2e459555c5f("shmem: stable directory offsets"),
simple_offset_rename will just add the new dentry to the maple tree of
&SHMEM_I(inode)->dir_offsets->mt with the key always inc by 1(since
simple_offset_add we will find free entry start with octx->newx_offset, so
the entry freed in simple_offset_remove won't be found). And the same case
upper will be break since we loop too many times(we can fall into infinite
readdir without this break).

I prefer this is really a bug, and for the way to fix it, I think we can
just use the same logic what 9b378f6ad48cf("btrfs: fix infinite directory
reads") has did, introduce a last_index when we open the dir, and then
readdir will not return the entry which index greater than the last index.

Looking forward to your comments!

I agree to all of the above.


Thanks, I will try to write a patch for this!




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

  Powered by Linux