On Sat, Jun 08, 2024 at 11:33:03PM -0700, Christoph Hellwig wrote: > On Fri, Jun 07, 2024 at 09:12:17AM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > For a very very long time, inode inactivation has set the inode size to > > zero before unmapping the extents associated with the data fork. > > Unfortunately, newer commit 3c6f46eacd876 changed the inode verifier to > > prohibit zero-length symlinks and directories. If an inode happens to > > ", newer commit" above reads really odd. Maybe just drop the "newer "? > > > + if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0) { > > + if (dip->di_version > 1) { > > + if (dip->di_nlink) > > + return __this_address; > > + else > > + ASSERT(0); > > + } else { > > + if (dip->di_onlink) > > + return __this_address; > > + else > > + ASSERT(0); > > + } > > No need for else after a return. > > With that fixed: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> It turns out that even this is still buggy because directories that are being inactivated (e.g. after repair has replaced the contents) can have zero isize. Sooo I'll have a new patch in a day or two. --D