Whamcloud - gitweb
LU-14618 lov: correctly handling sub-lock init failure 45/43345/2
authorBobi Jam <bobijam@whamcloud.com>
Fri, 16 Apr 2021 15:56:01 +0000 (23:56 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 May 2021 02:49:29 +0000 (02:49 +0000)
In lov_lock_sub_init(), if a sublock initialization fails, it needs to
bail out of the outer loop as well as the inner one.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic4e16f484a0a64c670eea5d47054bac19bc95144
Reviewed-on: https://review.whamcloud.com/43345
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_lock.c

index 0676522..93d0fbf 100644 (file)
@@ -200,6 +200,8 @@ init_sublock:
                        lls->sub_initialized = 1;
                        nr++;
                }
+               if (result < 0)
+                       break;
        }
        LASSERT(ergo(result == 0, nr == lovlck->lls_nr));