]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix order-1 allocation in afs_do_lookup()
authorDavid Howells <dhowells@redhat.com>
Thu, 9 May 2019 15:17:05 +0000 (16:17 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 May 2019 15:25:21 +0000 (16:25 +0100)
commit04b8306453ba766f15df3f43ad98e523834b71a0
tree3a143ae4a411fd26b1d98bffff3f66770e027901
parent4bfd9d9a3da3428a1c5f9b2984b4644dbdb6d305
afs: Fix order-1 allocation in afs_do_lookup()

afs_do_lookup() will do an order-1 allocation to allocate status records if
there are more than 39 vnodes to stat.

Fix this by allocating an array of {status,callback} records for each vnode
we want to examine using vmalloc() if larger than a page.

This not only gets rid of the order-1 allocation, but makes it easier to
grow beyond 50 records for YFS servers.  It also allows us to move to
{status,callback} tuples for other calls too and makes it easier to lock
across the application of the status and the callback to the vnode.

Fixes: 6769c742a244 ("afs: Prospectively look up extra files when doing a single lookup")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/afs.h
fs/afs/dir.c
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/yfsclient.c