rhashtable_walk_next() can return -EAGAIN when concurrent resizing
has happened. so the callers should check for this error and just
repeat rhashtable_walk_next().
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I15ba2cdf16c2678e18836b4f16b56a3b8bfdacd0
Reviewed-on: https://review.whamcloud.com/44766
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct inode *inode;
int nr;
+ if (IS_ERR(h)) {
+ if (PTR_ERR(h) == -EAGAIN)
+ continue;
+ break;
+ }
+
if (!priv->vsp_clob) {
struct lu_object *lu_obj;
rhashtable_walk_enter(&session_jobids, &iter);
rhashtable_walk_start(&iter);
while ((sj = rhashtable_walk_next(&iter)) != NULL) {
+ if (IS_ERR(sj)) {
+ if (PTR_ERR(sj) == -EAGAIN)
+ continue;
+ break;
+ }
if (!hlist_empty(&sj->sj_session->tasks[PIDTYPE_SID])) {
remaining++;
continue;