[lustre-devel] [PATCH 02/13] lustre: lov: correctly handling sub-lock init failure
James Simmons
jsimmons at infradead.org
Sat May 15 06:05:59 PDT 2021
From: Bobi Jam <bobijam at whamcloud.com>
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.
WC-bug-id: https://jira.whamcloud.com/browse/LU-14618
Lustre-commit: 1a5169f9962e254 ("LU-14618 lov: correctly handling sub-lock init failure")
Signed-off-by: Bobi Jam <bobijam at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/43345
Reviewed-by: John L. Hammond <jhammond at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Wang Shilong <wshilong at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/lov/lov_lock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/lustre/lov/lov_lock.c b/fs/lustre/lov/lov_lock.c
index efaca37..d137614 100644
--- a/fs/lustre/lov/lov_lock.c
+++ b/fs/lustre/lov/lov_lock.c
@@ -198,6 +198,8 @@ static struct lov_lock *lov_lock_sub_init(const struct lu_env *env,
lls->sub_initialized = 1;
nr++;
}
+ if (result < 0)
+ break;
}
LASSERT(ergo(result == 0, nr == lovlck->lls_nr));
--
1.8.3.1
More information about the lustre-devel
mailing list