afs: Fix comment in afs_do_lookup()
authorDavid Howells <dhowells@redhat.com>
Tue, 14 Nov 2023 09:19:08 +0000 (09:19 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 1 Jan 2024 16:37:27 +0000 (16:37 +0000)
Fix the comment in afs_do_lookup() that says that slot 0 is used for the
fid being looked up and slot 1 is used for the directory.  It's actually
done the other way round.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org

fs/afs/dir.c

index ecb889a269fb9315a46c21d46b15c19e05d483c9..e232f713ece1b8d112b32b92e58b28cc16f5d71d 100644 (file)
@@ -807,8 +807,8 @@ static struct inode *afs_do_lookup(struct inode *dir, struct dentry *dentry,
                cookie->fids[i].vid = dvnode->fid.vid;
        cookie->ctx.actor = afs_lookup_filldir;
        cookie->name = dentry->d_name;
-       cookie->nr_fids = 2; /* slot 0 is saved for the fid we actually want
-                             * and slot 1 for the directory */
+       cookie->nr_fids = 2; /* slot 1 is saved for the fid we actually want
+                             * and slot 0 for the directory */
 
        if (!afs_server_supports_ibulk(dvnode))
                cookie->one_only = true;