]> git.michaelhowe.org Git - packages/o/openafs.git/commit
pioctl: limit fruitless token searches
authorMark Vitale <mvitale@sinenomine.net>
Thu, 23 May 2019 02:52:10 +0000 (22:52 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 25 Jul 2019 11:18:51 +0000 (07:18 -0400)
commit27a21f35a81c3671c9752edfd4fa502f5fc281e0
treee2ddb8e5933a6824f22c286a095ce393de8233d8
parent22c9d9f8916cef5eacc9c930fc25c34c24de17e4
pioctl: limit fruitless token searches

getNthCell searches the afs_users table for the nth token set belonging to a
given user.  However, it is impossible for a user to have more than one
token set per cell.  If the caller specifies a number greater than the
total number of cells this cache manager knows about, we know the search
will be fruitless.

Instead, return early in this case, avoiding both the lock and the
search.

Reviewed-on: https://gerrit.openafs.org/13597
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit fc7e1700fe84f623fb9163466d24226df00b1a2c)

Change-Id: Idfda263af173a7ca081fcea3eef0ec4a63e66eda
Reviewed-on: https://gerrit.openafs.org/13639
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_pioctl.c