Commit 0aec3847 authored by David Howells's avatar David Howells Committed by Christian Brauner
Browse files

afs: Revert "afs: Hide silly-rename files from userspace"



This reverts commit 57e9d49c.

This undoes the hiding of .__afsXXXX silly-rename files.  The problem with
hiding them is that rm can't then manually delete them.

This also reverts commit 5f7a0764 ("afs: Fix
endless loop in directory parsing") as that's a bugfix for the above.

Fixes: 57e9d49c ("afs: Hide silly-rename files from userspace")
Reported-by: default avatarMarkus Suvanto <markus.suvanto@gmail.com>
Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008102.html


Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/3085695.1710328121@warthog.procyon.org.uk


Reviewed-by: default avatarJeffrey E Altman <jaltman@auristor.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 480e035f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -474,16 +474,6 @@ static int afs_dir_iterate_block(struct afs_vnode *dvnode,
			continue;
		}

		/* Don't expose silly rename entries to userspace. */
		if (nlen > 6 &&
		    dire->u.name[0] == '.' &&
		    ctx->actor != afs_lookup_filldir &&
		    ctx->actor != afs_lookup_one_filldir &&
		    memcmp(dire->u.name, ".__afs", 6) == 0) {
			ctx->pos = blkoff + next * sizeof(union afs_xdr_dirent);
			continue;
		}

		/* found the next entry */
		if (!dir_emit(ctx, dire->u.name, nlen,
			      ntohl(dire->u.vnode),