From ca7783348421da7ce628c69da5d4298fb372dc2b Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Sun, 31 Oct 2021 22:03:48 +0300 Subject: [PATCH] LU-15181 osd-ldiskfs: a typo in osd_declare_write_commit() A typo in osd_declare_write_commit() makes ASAN emit warnings like: UBSAN: Undefined behaviour in /lustre/osd-ldiskfs/osd_io.c:1404:2 shift exponent 4096 is too large for 32-bit type 'int' Change-Id: Ie612d9c6655211445c00bd17fa1bf7a836af3542 Fixes: f0f92773e ("LU-14187 osd-ldiskfs: fix locking in write commit") Signed-off-by: Andrew Perepechko Reviewed-on: https://review.whamcloud.com/45423 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Li Dongyang --- lustre/osd-ldiskfs/osd_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index a41799b..5a3bd8c 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -1413,7 +1413,7 @@ static int osd_declare_write_commit(const struct lu_env *env, * heavily-fragmented, it will be reduced to 4K at the worst. */ extent_bytes = osd_extent_bytes(osd); - LASSERT(extent_bytes >= (1 << osd_sb(osd)->s_blocksize)); + LASSERT(extent_bytes >= osd_sb(osd)->s_blocksize); /* calculate number of extents (probably better to pass nb) */ for (i = 0; i < npages; i++) { -- 1.8.3.1