[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <940273.1731946188@warthog.procyon.org.uk>
Date: Mon, 18 Nov 2024 16:09:48 +0000
From: David Howells <dhowells@...hat.com>
To: Advait Dhamorikar <advaitdhamorikar@...il.com>
Cc: dhowells@...hat.com, Marc Dionne <marc.dionne@...istor.com>,
linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH-next] afs: Remove logically dead code
I think the attached change is what I want.
David
---
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index b6a202fd9926..2adc034603f2 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -499,11 +499,11 @@ static int afs_dir_iterate_contents(struct inode *dir, struct dir_context *ctx)
iov_iter_folio_queue(&iter, ITER_SOURCE, dvnode->directory, 0, 0, i_size);
iov_iter_advance(&iter, round_down(ctx->pos, AFS_DIR_BLOCK_SIZE));
- iterate_folioq(&iter, iov_iter_count(&iter), dvnode, ctx,
- afs_dir_iterate_step);
-
- if (ret == -ESTALE)
+ if (!iterate_folioq(&iter, iov_iter_count(&iter), dvnode, ctx,
+ afs_dir_iterate_step)) {
afs_invalidate_dir(dvnode, afs_dir_invalid_iter_stale);
+ ret = -ESTALE;
+ }
return ret;
}
Powered by blists - more mailing lists