diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c index 9687cad8be96..0a3d9eecbf16 100644 --- a/fs/erofs/zutil.c +++ b/fs/erofs/zutil.c @@ -35,8 +35,11 @@ void *z_erofs_get_gbuf(unsigned int requiredpages) __acquires(gbuf->lock) { struct z_erofs_gbuf *gbuf; + unsigned long flags; + local_irq_save(flags); gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()]; + local_irq_restore(flags); spin_lock(&gbuf->lock); /* check if the buffer is too small */ if (requiredpages > gbuf->nrpages) {