Re: [PATCH] xfs: allow unlinked symlinks and dirs with zero size

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

 



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>





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux